« first day (2012 days earlier)      last day (2823 days later) » 

6:00 AM
@Dennis huh wow that's cool
i should've done that for cheddar
or maybe not seems a bit funky
 
@Downgoat don't you already do that?
@Downgoat doesn't (+)(3,4) work?
 
cheddar> var fd = IO.open("README.md", 'r')
cheddar> String::fd.read(10)
"<p align=\""
cheddar> String::fd.read(1000)
"center\">
  <a href=\"https://github.com/vihanb/Cheddar\">
    <img src=\"https://raw.githubusercontent.com/vihanb/Cheddar/master/misc/logo_wide.png\" alt=\"Cheddar\" width=\"846\">
  </a>
</p>

<p align=\"center\">
  <a href=\"https://travis-ci.org/cheddar-lang/Cheddar\"><img alt=\"Travis Status\" src=\"https://travis-ci.org/cheddar-lang/Cheddar.svg?branch=master\"></a>
  <a href='https://coveralls.io/github/cheddar-lang/Cheddar?branch=tests'><img src='https://coveralls.io
\o/ \o/ \o/ \o/
@MᴀʀsUʟᴛᴏʀ yes, it does
but like I'm guessing that allows infix functions
 
$ python infix-neologisms+srand.py ../generic-corpora/containers.txt
demicaskjohn mpacofferilug ampsacaskckoule chpacchubkageub bbowlox bpoamphoratag botcarbintontle pbopailwlot bobojugwlwl chjarest cannvibarrelalister flademiboxjohngon pobotbuckettleuch trchestunk bcaskag carpampouleotboy bcupin potruchubnkuch kpackageeg carpapotilton
 
goat compare sheep == compare(goat, sheep) == goat > sheep
 
@Downgoat i don't think so?
 
6:02 AM
I finally got a NaNoGenLab appliance working. :3
 
my understanding is that all operators can be used as functions but not the reverse
 
demicaskjohn
mpacofferilug
ampsacaskckoule
chpacchubkageub
bbowlox
bpoamphoratag
botcarbintontle
pbopailwlot
bobojugwlwl
chjarest
cannvibarrelalister
flademiboxjohngon
pobotbuckettleuch
trchestunk
bcaskag
carpampouleotboy
bcupin
potruchubnkuch
kpackageeg
carpapotilton
^ A list of infix neologisms of containers. Which do you like?
The long list is annoying. It covers half screen for me. :(
 
Could anyone test some dc code for me?
 
@SirBidenXVII exempt
 
Hello
 
6:09 AM
Hello
 
Hello
 
Hello
 
Hello
 
Not sure I understood that ("exempt")
 
6:10 AM
@SirBidenXVII I'm exempt from that.
 
It probably means, no thanks
 
and ^
 
Ah, duly noted :)
 
One day I'll figure out how to run Haskell interactively...
 
ghci not working for you?
 
6:13 AM
@Dennis If you want to run multiple lines in a REPL, you have to surround them with :{ and :}.
 
@Doorknob :}
 
Prelude> :{
Prelude| f 0=0
Prelude| f n=n-(f$f$f$n-1)
Prelude| :}
Prelude> f 20
14
 
@Downgoat Are you doing it?
@Doorknob hola
@Doorknob mi nuevo amor xd
 
I have a maths puzzle I came up with but don't know the answer to. Halp
 
@DestructibleWatermelon go ahead
 
6:15 AM
Prelude> :{
Prelude| f 0=0
Prelude| f n=n-(f$f$f$n-1)
Prelude| :}

<interactive>:5:4: parse error on input `='
:{ indeed.
 
Isn't Prelude the name of an esolang?
@Dennis what is your version of prelude?
 
@Dennis wat
 
@LeakyNun Nope, Prelude is also the name of the REPL for Haskell.
 
@DestructibleWatermelon Those are some of the best puzzles. Will it fit in the chat or do you have to pastebin it or something?
 
@zyabin101 No, it's not. The name of the REPL is ghci.
 
6:17 AM
@zyabin101 I see
 
By default, the REPL shows everything currently imported before the prompt. Prelude is all the stuff imported by default.
 
@Doorknob Then what is Prelude?
 
@LeakyNun recusion is borked in cheddar
:|
 
It's real simple somewhat simple, it is based on pokerface
 
It gets better. SO suggested let to get rid of the error.
Prelude> let f 0=0
Prelude> let f n=n-(f$f$f$n-1)
Prelude> f 1
*** Exception: stack overflow
 
6:18 AM
question: synonyms for opened like IO.stdin.opened looks ugly
 
@Downgoat define borked
 
@Dennis no no no the PPCG is the Exception to QA format
 
@LeakyNun doesn't work, output is extremely weird
 
@MᴀʀsUʟᴛᴏʀ define weird
 
@Dennis wut. Does it work if you stick both the code blocks in a file and compile it with ghc?
 
6:19 AM
@LeakyNun try fibonacci for yourself
 
@Doorknob It does.
 
@Downgoat I can't install make
 
I'm not sure how to phrase this puzzle. It is based on the idea of a bot that will play
the bot tries to get flushes
 
@LeakyNun :(
 
@Dennis O_o What's your ghci --version?
 
6:20 AM
@Downgoat how to install make?
 
@Doorknob What is Prelude?
 
idk if that works though
 
@Doorknob 7.6.3
 
tried to install on my windows VM and never finished
 
@Downgoat It's for Windows.
 
6:20 AM
@Dennis Mine's 8.0.1. Not sure if that makes a difference, though...
 
But runhaskell is also 7.6.3...
 
@zyabin101 I'm on Windows
 
3 mins ago, by Doorknob
By default, the REPL shows everything currently imported before the prompt. Prelude is all the stuff imported by default.
 
the bot tries to get a flush, and it does this by keeping the suit that has the highest amount of cards in hand dealt, discarding the rest to draw more cards, that might be the same suit, drawing three, then seeing if it has 5 of the same suit.
What is the chance that the bot gets a flush?
 
@LeakyNun Careful, they may break if you stand on them.
6
 
6:21 AM
@LeakyNun okai :3
 
@Dennis right, but maybe it's something to do with the REPL itself. Although I can't imagine something as simple as multiline suport being added so late.
 
I gave up trying to understand Haskell's ways during the PLQ.
 
C:\Users\xxxxxxxx>make
'make' 不是內部或外部命令、可執行的程式或批次檔。 ('make' is not internal or external command, executable or bash)
 
Details on pokerface: initial hand has 5 cards, where each card can be swapped for a new one (unseen), then a bot may draw 3 cards and decide on the best hand from the 8 cards
 
(What was I doing again before talking about Haskell?)
 
6:23 AM
>_> when you open byte counter instead of google translate
 
@Downgoat added translation
 
@LeakyNun wat
 
Found it
87
Q: How to define a function in ghci across multiple lines?

Peter McGI'm trying to define any simple function that spans multiple lines in ghci, take the following as an example: let abs n | n >= 0 = n | otherwise = -n So far I've tried pressing Enter after the first line: Prelude> let abs n | n >= 0 = n Prelude> | otherwise = -n <interactive>

 
i know solution
use linux? :P
 
@Downgoat how do i use make
 
6:23 AM
(lemme find alternative to make for windows)
 
@zyabin101 I added translation
 
@LeakyNun you should just run make as so in cheddar dir after running npm install
 
C:\Users\XXX>cd Cheddar

C:\Users\XXX\Cheddar>make
'make' 不是內部或外部命令、可執行的程式或批次檔。
@Downgoat
 
._____.
 
So, I will rephrase the puzzle. A bot pulls 5 cards from a deck of playing cards. It sees which suit has the highest amount of cards in this group of 5 cards, and discards all cards of other suits into a discard pile. It then draws as many as it has discarded. It then draws 3 cards. What is the chance that it has 5 cards of the same suit?
 
6:27 AM
installation of make maybe failed?
 
@LeakyNun 对不起,我不明白这一点
 
@DestructibleWatermelon We're going to have to consider each case one by one. Already has a flush? 100%. Four cards? Let me do the math
 
106 error Windows_NT 6.1.7601
107 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
108 error node v6.3.1
109 error npm  v3.10.3
110 error code ELIFECYCLE
111 error cheddar-lang@1.0.0-beta.25 prepublish: `make`
111 error Exit status 1
112 error Failed at the cheddar-lang@1.0.0-beta.25 prepublish script 'make'.
112 error Make sure you have the latest version of node.js and npm installed.
112 error If you do, this is most likely a problem with the cheddar-lang package,
 
Good morning!
 
@Quill question: how to check if node stream is paused
 
6:29 AM
Good night!
 
@Sherlock9 You actually were right, this is more complicated than I thought before
 
@Doorknob Whitespace to the rescue!
Prelude> :{
Prelude| let f 0=0
Prelude|     f n=n-(f$f$f$n-1)
Prelude| :}
Prelude> f 20
14
 
@LeakyNun oh
 
@betseg Günaydın
 
There are 47 cards left after getting 5, and 9 cards of that suit. Chances are 1 - (38*37*36*35)/(47*46*45*44) = 0.5861575981835001 ~= 58.6% with four cards already in hand. Now onto three cards and two cards (has to be two cards minimum because you can't have five cards of all different suits)
 
6:32 AM
@Downgoat
 
@Sherlock9 can you please explain to me the (38*37*36*35)/(47*46*45*44)?
 
C:\Users\XXX>node --version
v6.3.1
@Sherlock9 four cards already in hand is 58.6% ??
 
@Sherlock9 yeah, that doesn't seem quite right...
 
@DestructibleWatermelon Well, it's easiest to count the ways you don't get a flush. You have 38 not-flush cards and 47 total. You draw four, so the chances go 38/47, 37/46, 36/45, 35/44
If you already have four cards of the same suit in hand, the chance of getting a flush after that is 58.6% as you are drawing four new cards, if I understand you correctly
 
So is everyone on?
 
6:34 AM
@LeakyNun ok, ignoring the error. do you see a node_modules directory?
 
@Downgoat yes
 
I made for loops! Yes!!!
 
@LeakyNun and make still is not found?
 
@DerpfacePython congratulations! is it a boy or a child?
 
It's a child.
 
6:36 AM
@Downgoat found, and then?
 
I'm very proud of it!
 
@LeakyNun so make exists?
@LeakyNun wat does this have to do with for loops .___.
 
@LeakyNun 谢谢
 
@DestructibleWatermelon Does that help at all? The math for three flush cards in hand and two flush cards in hand is a little trickier, so I may skip over the explanation
 
@Sherlock9 yes, it makes sense, but i see 58% and I go O.o
 
6:37 AM
@LeakyNun make is a command
 
That's because you already have four in hand, and you only need one to make it. The chances of falling flat on your face in that case are reasonable but not huge.
 
@Sherlock9 yes, I was surprised it was that small a chance of flush
 
Ah
Well, hang on then
 
It's correct though
Much higher than 25%
 
@Downgoat Halp how the brain fuck do I use make
 
6:40 AM
@LeakyNun make install
 
@MᴀʀsUʟᴛᴏʀ make is not an internal or external command, ...
 
@MᴀʀsUʟᴛᴏʀ have @LeakyNun done make?
 
Alright let me try the 3-card case. Might be harder because I have to account for only zero or one flush cards drawn
 
@LeakyNun did you install this?
 
@LeakyNun Can I have the binary for "Hello, World!" again?
Actually, just the decimal.
 
6:42 AM
@DerpfacePython pyth.herokuapp.com/…
 
@Dennis ... no idea why that would make a difference, but okay.
 
@Sherlock9 should be 13.5%
 
@MᴀʀsUʟᴛᴏʀ maths pls
 
3-card case is 28.5% by my count. 1-((37*36*35*34*33)/(47*46*45*44*43)+5*(37*36*35*34*10)/(47*46*45*44*43)) = 0.2852734039619568
 
wait
you draw 3 cards
 
6:44 AM
Thanks!
 
@Downgoat
./bin/install --method=path
process_begin: CreateProcess(NULL, env bash C:\Users\XXX\Cheddar\bin\install --method=path, ...) failed.
make (e=2): 系統找不到指定的檔案。

make: *** [install] Error 2
 
By "3-card case", I mean you have three cards, you draw two to replace them and draw three more after, so you draw five in total
 
(System cannot find specified file)
 
@Sherlock9 oh whoops didn't read properly
 
I never could use make
 
6:46 AM
@LeakyNun probably no Makefile. İs there a file called configure?
 
0
Q: Tips for golfing in Cheddar

Leaky Nun Cheddar is a high-level, functional + object-oriented programming language created by our user Downgoat designed to make programming easier, faster, and more intuitive. What general tips do you have for golfing in Whitespace? I'm looking for ideas which can be applied to code-golf problems and...

\o/
@betseg there is a Makefile
 
@Sherlock9 isn't it 21.8%? it's not always gonna be the last card that has the same suit
 
@LeakyNun \o/ \o/ \o/ brb posting some tips
 
@Doorknob soy estupido
 
Why does that say Whitespace?
 
6:46 AM
why did someone write whitespace instead of cheddar?
 
@MᴀʀsUʟᴛᴏʀ How come?
 
@LeakyNun okay well that's not good. here let me find the command you can run instead of make
 
I got ninja'd dammit
 
@DestructibleWatermelon because I'm stupid
 
@LeakyNun wait you can just do npm install -g cheddar-lang
 
6:47 AM
@SirBidenXVII copy pasta
 
@MᴀʀsUʟᴛᴏʀ That's why 5* that last bit. There's 5 places that card can show up in
 
1
Q: Tips for golfing in Cheddar

Leaky Nun Cheddar is a high-level, functional + object-oriented programming language created by our user Downgoat designed to make programming easier, faster, and more intuitive. What general tips do you have for golfing in Cheddar? I'm looking for ideas which can be applied to code-golf problems and wh...

 
@Sherlock9 wait my bad
 
@Downgoat Then how do I use it?
 
@LeakyNun just run cheddar
 
6:49 AM
"Tips for starting Cheddar"
 
@Downgoat merveilleux
 
Case of holding two cards: 29.6% `1-((36*35*34*33*32*31)/(47*46*45*44*43*42)+5*(36*35*34*33*32*11)/(47*46*45*44*43*42)+10*(36*35*34*33*11*10)/(47*46*45*44*43*42))
0.29561345007852335`
That's weird
 
@Sherlock9 `` does not work in multi-line
 
> What general tips do you have for golfing in Whitespace? I'm looking for ideas which [...] are [...] at least somewhat specific [...] (e.g. "Remove unnecessary whitespace." is not an answer).
Someone should suggest removing whitespace in the Whitespace tips.
 
There won't be a one-card case, right?
 
6:51 AM
@SirBidenXVII Why not?
@Sherlock9 not 20*?
 
@MᴀʀsUʟᴛᴏʀ pigeonhole principle
 
Because holding five cards of different suits means having five suits in one deck
 
@SirBidenXVII oh yeah
 
@LeakyNun I thought I edited the second line out. Dang it
@MᴀʀsUʟᴛᴏʀ 5*4 spaces, yes, but we don't care in what order, so divide by 2
Case of holding two cards: 29.6% 1-((36*35*34*33*32*31)/(47*46*45*44*43*42)+5*(36*35*34*33*32*11)/(47*46*45*44*4‌​3*42)+10*(36*35*34*33*11*10)/(47*46*45*44*43*42)) = 0.29561345007852335
 
Unless the fifth card is actually a fake coin
 
6:54 AM
@Downgoat absolutely with 100% certainty: no idea
 
Syntax Error: Unexpected token at 1:2
1 | f := i->i+1
  |   ^
@Downgoat
 
@LeakyNun use let f =
 
@Sherlock9 more chance if less of the right suit? that cannot be right...
 
cheddar> f = i->i+1
Runtime Error: Attempted to access undefined variable `f`
 
@LeakyNun ^^^
 
6:55 AM
@MᴀʀsUʟᴛᴏʀ still doesn't work
 
It's a weird curve. There's more flush cards to possibly get (11 this time) and you can draw 6 from the deck. I guess that's how it worked out
 
Well… it does mean there are more suitable cards to pick and fewer unsuitable cards to avoid
 
@LeakyNun What's your code again?
 
@Sherlock9 let f = i->i+1
 
@LeakyNun its var f = -> 'goats'
Planning to make let synonym of var
 
6:56 AM
@Downgoat then how define function
 
like non-lambda?
that is on todo list?
multiline lambda is -> { code }
 
@Downgoat eh, lambda
@Downgoat if f is the function then what is the variable?
 
oh for variables do:
var f = n -> n + 1
 
@Downgoat awesome
 
@Sherlock9 I'm serious. I don't believe you.
 
6:58 AM
@DestructibleWatermelon why not?
 
I don't know. The math checks out. You can double check it, if you wish
 
Well, it defies intuitive logic
 
We could try playing an infinite number of rounds of this and find the experimental probabilities.
 
Probabilities always do that :D
 
@DestructibleWatermelon how? you get to draw more cards
 
7:00 AM
@Sherlock9 I should think that the offset in chance of drawing a flush card would be counteracted by the fact you don't need to draw one more flush card
 
@DestructibleWatermelon Oh, so you want to stop once you have your flush? I just figured the bot would keep going even after they received a flush
The last probability is the chance that they receive three, four, five or six cards in their draw.
 
@Sherlock9 well, they keep drawing, but it is about whether they have 5 cards in the 8 they have
 
AH WAIT
Let me recheck that math
 
Well, yeah, can't you see the bot is on a roll? Why stop here?
 
You were right, you were right
1-((36*35*34*33*32*31)/(47*46*45*44*43*42)+6*(36*35*34*33*32*11)/(47*46*45*44*4‌​3*42)+15*(36*35*34*33*11*10)/(47*46*45*44*43*42)) = 0.1306714282640966
2-card case is 13.1%
Apologies for messing that up
 
7:03 AM
@Sherlock9 I like being right :)
 
The confusion was fun while it lasted
 
Anyway, now you need to figure out the chance of each of those chances
 
@DestructibleWatermelon Comparatively easy. Hang on a sec
Chance of a flush right out of the gate = 0.20% = 12/51*11/50*10/49*9/48 = 0.0019807923169267707
 
@Sherlock9 times four
 
Nuts
 
7:07 AM
@Sherlock9 isn't it just 12/51*11/50*10/49*9/48
 
Four is 12/51*11/50*10/49*39/48*5 = 0.0429171668667467 = 4.29%
 
0.00198079231692677?
 
@Sherlock9 yeah
 
why times 5?
 
5 places to put the non-flush card
 
7:09 AM
oh I misread stoopid me
 
Chances of four cards and recovering = 2.52% = 12/51*11/50*10/49*39/48*5*(1-(38*37*36*35)/(47*46*45*44)) = 0.025156223451452738
Ah nuts hang on
 
(I got a lot riding on this; I plan to make this flushbot for the pokerface <_<)
@Sherlock9 nope, that's messed up now, 9% chance more than 4% chance of getting it in the first place
oh,you fixed it now
so, uh, I guess flush bot doesn't have much chance huh ;_;
 
@Downgoat halp how do factorial
 
3 cards = 0.3261704681872749, 3 cards and recovering = 0.09304775973164904. 32.6% and 9.30%
 
@LeakyNun oh :| totally forgot
uh
idk >_>
can't you'd have to write a for loop
 
7:16 AM
@Downgoat oh right
fork my python algorithm to cheddar
and post it as an answer
 
2 cards=1-sum(chances of others)
 
Okay, I'm confused: 12/51*39/50*38/49*37/48*10 = 1.0971188475390155
 
1-(0.3261704681872749+0.0429171668667467+0.0019807923169267707)=0.62893157262905‌​16384
 
@Downgoat how get input
 
and chance of 2 and recovering= 0.0821833868758226
ok, now to add the recovering chances together and we will have answer
 
7:20 AM
@Sherlock9 why *10?
 
@DestructibleWatermelon 0.20038737005892437 is the apparent result
@MᴀʀsUʟᴛᴏʀ 5*4/2 places to put the two cards, I thought
 
I got 0.2023681623758511461...
so ~20% chance of flush, huh?
I guess that's fair. NOW FOR THE REAL CHALLENGE: WHAT IS THE CHANCE OF FLUSH BOT BEATING LUCKYBOT MUHAAHAHAHAHAHAHA
 
String.slice() - approved as is
String.split() - approved as is
String.ord() - approved as is
String.length() - approved as is
String.chars() - approved as is

Array.length() - approved as is

IO.prompt() - approved as is
IO.printf() - approved as is
IO.sprintf() - approved as is

Math.fib() - approved as is
Math.isprime() - proposed name: "Math.isPrime()"
 
@DestructibleWatermelon I think so. I'll want to double check later, though. We should run through simulations to see how many flushes it actually gets. At least, 10000 runs for good data
 
@Sherlock9 you forgot to subtract the chance for two pairs (?) and full house?
 
7:24 AM
@Downgoat I reviewed v1.0.0 beta release 1 stdlib for possible embetterment via camel case.
 
@MᴀʀsUʟᴛᴏʀ Could be. I have no idea
 
I'm going to use standard prefixes: get, set, is, next.
 
well, now to actually build flush bot. Could be a fair program. Also, what is the chance of flush bot getting a royal flush naively >:)
I'm calling flushbot "plumber" ;)
 
@DestructibleWatermelon link to question?
 
@MᴀʀsUʟᴛᴏʀ here
 
7:29 AM
Allo
 
please join. Pairbot needs more competition to not just lose to leobot, and beat luckybot,
 
7:41 AM
g'night .o/
 
I built a quick flush tester. Looks like it is about 20%. Well I'll be darned :D
@DestructibleWatermelon I can send you the code if that will help you make flushbot
It's not very sophisticated
 
20% is a fair chance, I reckon
flushbot will work best in large groups, I think
 
8:03 AM
@zyabin101 the view is too foggy in the mornings: i.imgur.com/rLT9lSb.jpg
 
@betseg Am I free to use this as a wallpaper? :3
 
@zyabin101 ya of course
@zyabin101 this fog vs this fog
 
8:30 AM
HI
 
How did the BS symbol appear in chat? :/
(in my chat box)
 
> Golomb's sequence: a(n) is the number of times n occurs, starting with a(1) = 1.
Alright
so, a(2) is the number of times 2 occurs...
How the fuck am I going to know how many times 2 occurs?
@orlp the predict-the-future sequence
 
¯\_(ツ)_/¯ take a crystal ball, it may help you
 
@TùxCräftîñg merci, cela marche
 
> a(1) = 1; a(n+1) = 1 + a(n+1-a(a(n)))
@LeakyNun .
 
8:37 AM
a(n) = phi^(2-phi)*n^(phi-1) + E(n)
huh
 
@betseg It was a joke
 
@betseg You can get out better with two ways:
 
@TùxCräftîñg You must be fun at parties
 
@LeakyNun ¯\_(ツ)_/¯ i never go to parties
 
One, use a caret to point to the message.
 
8:37 AM
@LeakyNun ☺🔫
 
> Two, do it like this
 
2 can't occur once (or 1 doesn't occur once)
 
@betseg ^^
 
2 could occur twice, and so does
 
@DestructibleWatermelon what about a(3)?
 
8:38 AM
couldn't occur once, but could occur twice
and so does
 
> oh that works
 
The first day button is travelling in time!
<< first day (2012 days earlier)
 
now just have to wait 4 days to have 2016 days earlier
 
Yup!
 
4 can not occur once or twice, so occurs three times
 
8:40 AM
Then the first day button will be at 2016!
 
Jan 28 '11 at 4:35, by Feeds
Welcome to chat for: Code Golf
 
@zyabin101 ?
 
@MᴀʀsUʟᴛᴏʀ I deducted that 2012 days earlier could also mean the year 2012.
 
0
A: Sandbox for Proposed Challenges

Kevin Cruijssen3D Pythagorean theorem code-golfmathnumber A very easy challenge. I think we all know the Pythagorean theorem formula: c² = a² + b². Now let's calculate the 3D Pythagorean theorem instead: d² = a² + b² + c². Input: Three integers. The input type can be anything reasonable. So could be thre...

 
8:44 AM
> yep
 
the left screen is borked
 
@TùxCräftîñg in my language "bork" means fuck
 
what language ಠ_ಠ
 
@TùxCräftîñg Cantonese
 
ಠ¯ಠ
 
8:49 AM
My country has %75 of world's boron reserves
 
cool
> The largest known boron deposits are in Turkey, the largest producer of boron minerals.
k
 

« first day (2012 days earlier)      last day (2823 days later) »