« first day (3171 days earlier)      last day (1671 days later) » 
00:00 - 15:0015:00 - 00:00

Anonymous
3:02 PM
And now I get to spend my Saturday working on finishing something that they half-assed
 
Anonymous
So I'm thrilled
 
Yay!
(You do get overtime pay, right?)
 
Anonymous
I'm salaried, so no
 
I'm planning on doing some work this weekend too. Got a project I want/need to have done by Monday and this whole SE drama ate up half my time at work. >_<
Also salaried.
 
Why does salaried mean no overtime pay?
 
3:12 PM
I get paid X dollars per year regardless of how much (or little) I work.
Naturally, if I stop working or slack off a lot, then I get fired.
Basically all my company cares about is "did you get your work done in a reasonable amount of time". I can go to doctor's appointments or whatever in the middle of the day and no one cares.
 
But who assigns you work?
What if they give you too much?
 
At my company in particular, my bosses are great, so YMMV for other companies. People generally have a pretty decent estimate of how long it'll take to fix a bug or do a project, and there's frequent communication regarding progress so there usually aren't any surprises.
Actually, come to think of it, when I was assigned this project I'm working on now, there was literally no time limit or expectation, due to the magnitude of its scope and uncertainties about what gotchas might be uncovered. So far it's been two months (I think) and we're about to ship the first iteration.
 
So, you're working at the weekend because you feel an ethical obligation to be fair to your employer?
That's not the worst reason I've ever heard, by a long way.
 
@wizzwizz4 Not really, no. I just wanna get this thing done!
 
Oh. That's much better than silly old ethics.
Actually enjoying what you do.
 
3:26 PM
Aye, I do love my job.
I actually had to consciously develop a work/home separation because my work was so close to what I had previously been doing as a hobby (to put it lightly).
 
@El'endiaStarman I'm also really enjoying the project I'm currently working on
I'm writing code that draws shapes and/or waves on a screen
 
I find it amusing that that statement is both very simple and hints at something really interesting.
Like, if you were just a newbie programmer, I'd be like "Oh cool!" and supportive of you learning stuff. But I know you're an experienced coder, so instead I'm like "...what are you really working on?" :P
 
Hehe
 
Anonymous
@wizzwizz4 The main reason I'm working today is because I missed a day last week, and I'm almost out of PTO/sick days (both PTO and sick days deplete a single allotment of days off at my company), so I made a deal with my boss to work today and get that day off sick.
 
Anonymous
I'm drawing small shapes on small screens that do things when you poke them
 
3:34 PM
Man, I'm missing out on the drawing shapes fun. My code just gets things from a place and other things related to those.
 
@Mego A pocket radio software.
 
@El'endiaStarman So if you drew x = cos(θ), y = sin(θ) on a canvas, obviously you'll get a circle. If the angles increase at different rates you get some really interesting shapes, so we use x = cos(a * θ), y = sin(b * θ). For a=1, b=2, you'll get kind of an infinity shape.
 
Anonymous
@wizzwizz4 Close
 
Anonymous
The device goes in your pocket and uses radio waves for communication
 
Anonymous
But most people would call it a mobile phone or a cell phone
 
3:38 PM
But that's not its primary function!
 
Now if a=1.5, b=1, then having θ in [0°, 360°) it creates a shape that looks like it's cut off in the middle. So it's better to do two full revolutions
So one problem I'm running into, is "given an arbitrary a and b, how do I know an appropriate number of revolutions to do?"
 
Anonymous
@DJMcMayhem 7
 
If you do too many, you'll end up with a mess because they start overlapping and not being distinct lines anymore
 
Anonymous
Surely that problem has been solved - they're Lissajous curves
 
@Mego Oh wow thanks I didn't know the name for that
That's really helpful actually
 
Anonymous
3:41 PM
Glad I could help
 
Anonymous
And also glad I remembered something from pre-calc
 
So basically I'm making a graphical Lissajous editor
 
You should just be able to write a and b as fractions with the same denominator, and take the denominator.
 
Although the waves don't necessarily have to be sinusoids. You could use triangle or buzzsaw waves
 
@DJMcMayhem heh, i once made something like that for when we had them in a physics lesson
 
Anonymous
3:43 PM
Well, technically they're special cases of Lissajous curves with A = B = 1, δ = π/2
 
@Mego well sure the ones I described are. But I think I'll eventually let the user specify all of those too
I just haven't gotten around to that yet
"X/Y multiplier"
You can also rotate the entire shape around the origin
 
Anonymous
@wizzwizz4 That will only work if a/b is rational
 
@Mego And if it's not, there's no way to make a closed loop.
 
Anonymous
Correct
 
But all floats are rational.
 
Anonymous
3:46 PM
So if a/b isn't rational, the problem can't be solved, and you have to decide on an arbitrary "good enough" point
 
Anonymous
@wizzwizz4 Who said anything about floats? Maybe symbolic input is allowed
 
I've been doing too much IEEE lately.
 
@Mego Can use continued fractions to help derive a good rational approximation.
 
@wizzwizz4 I did try rounding to the hundredths place. It "works" but like I said, if you do too many revolutions the lines and up really close together and looks terrible
Like one big blob
 
@DJMcMayhem Is this designed for looking nice?
 
3:48 PM
Not necessarily but it would be preferred
 
@DJMcMayhem could creating the infinite fraction of x÷y & cutting off at some point work?
(whether "some point" is taking first N items or until the item is over some constant, or some mix of the two, i have no idea, all i know is that infinite fractions are a fun way to round fractions)
 
Or just iterate through all the values of i in the allowable range and find the one with the minimum difference between the ends of the line.
 
@dzaima Isn't that basically the same? Just taking a certain number of decimal points
Although this conversation does help me realize that the exact values of a and b don't matter nearly as much as a/b
 
@DJMcMayhem that doesn't refer to "decimal" though, and allows for funky ratios (e.g. x=1/7 & y=1) very clearly
 
I think right now if you made a or b high enough, it'll draw across the circle rather than around it (if that makes any sense)
 
4:18 PM
here's quick apl "rounding" a given float (with a hard-coded max "complexity" of 100, whatever that means)
 
4:59 PM
here's a damn 1+ quine. seriously, though, that was surprisingly fun. that should also be _very_ golfable
https://tio.run/##7VxJc9pIFL7zK56lAy2QBSI5YTjYqUrKExdFeZLDRMiUkJqgGm3TEl4qzG9nXksswhhmDqkMywOs6uXr7639WtLByUs2iaPWfK5eNKapaIz8qMGjR0jy8YoKZh38KOMiERyv2Ib@cqrvCDd4gS/OMw@gAb9xwUPZjXRoNc33iLjzXR65HPwUPnyAmz8uf7@G90YTwR@v78A03mHrU@8rfOrfPb6r@GESiwzSl7QyFnEIbhwE3M38OEphMefxv6a8Ukl1SD3oFl2m6fDj70rF42OII54E05SliO1CD7tauwL48ccQxcgtsqK/GAt4xFCe4YjvjxpcdKG1npafRKDxoHxNne@8DQrUYYm2mjb2FLDGfsAhi2HEgT9zd5pxz1Y2SOQS/uxnzNTWsqMEFYyTknzLtHWoiuoaJJwnBCHUENzx2MZqww3ilC/GeJCiegUcTczH8ssk1OFeh1Ga6XCjQw/nL
size/2:
https://tio.run/##7VpJc9pIFL7zK56lAy2QJURywnAwqUrKExdFeZJDImRKSE1QjbZpNV4qzG8nryUWYQwz8bDZAFjVy9ff258Q5fiRD6KwOh7LZ/owYXrPC3Ua3kGc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ಠ_ಠ
@dzaima no, that's "is less than 2" ಠ___ಠ
 
5:26 PM
@dzaima Zero is 11+1<.
 
@wizzwizz4 that's for checking if zero is the top element of stack
1+1< works though
at which point inlining is way better (it probably was before too but whatever)
 
Any more feedback on this? Planning on posting soon
 
full program with that
https://tio.run/##7VlLc9pIEL7zK9rSgRGSBSI5YTiYVCW1GxdFeZPDRsiUkIagWr12NPhR8f52tkdCIIwhay8PE0CgmsfXX3dP9/RIdvzAR1FYn0zks@o4YdWBF1ZpeAtxOl6SwVDBCzllMaN4xzZ086muzRz/Ab7Y99SHKvxOGQ1EN9SgXjPeI@LKc2joUPAS@PAB2n@e/3EJ7/Uagj9eXoGhv8PWp85X@NS9un1X8oI4YhySh6Q0ZFEATuT71OFeFCYwnXPp32NaKiUaJC60si5RNPjxT6nk0iFEIY39cUISxLagg12lUQL8eEMII@RmPOtPx3waEtSn2@z7rQJnLajPp8UnZug8SF8T@zttgAQq5GizZmFPAnPo@RR4BAMK9J46Y05dS1ogESL03uPEUOa6wxgNjOKCftOwNCiz8hzE7DsEIVRn1HbJgrTu@FFCp2PUT9C8DI4upmPpbRRocK3BIOEatDXo4LxpieXS5mtXw28KHkYMHBFhJFpYJQdaLSiT8uLatEFtgbEwhHp0O0anXNJRlhmUJYbzpwzXpuCIo5golojgwiQS
 
6:18 PM
even shorter
https://tio.run/##7VhLc9pIEL7zK9rSgRGSBUNywnAwqUpqtyiK8iaHjVAoIQ1BtXrtaPCj4v3tbI@EQBhDnCwQkgUZah5ff/2Y7pbk5EFM46g5n6sX9VnK62M/qrPoFpJsvaIC1cGPBOMJZ/iLYxgUWwOHu8EDvHfuWQB1@J1xFsppZECzQV8joue7LHIZ@Cm8eQPdPy//uIbXZgPBb697QM1XOHrX/wDvBr3bVxU/TGIuIH1IKxMeh@DGQcBc4cdRCos9j/09Y5VKakDqQSefEs2AL/9UKh6bQByxJJilJEVsB/o41VoVwI8/gShGbi7y@WItYBFBfabDP99qcNGB5mpbfhKOzoPyIXU@sxYooEOBtho2zhSwJn7AQMQwZsDumTsTzLOVNRIpwu59Qai20h0laGCclPRb1DagyqsrEHfuEIRQkzPHI2vSphvEKVussSBF83I4upitZT/T0IAbA8apMKBrQB/3LVuGy1jFroF/GXgSc3DlCSPRWpRc6HSgSqrrsemC3gG6toR6TCdBpzzS1zYZtA2Gy6cMN5bkSOKEaLY8wbVNJOpCGxrrLKVz@i
 
6:35 PM
0
A: Sandbox for Proposed Challenges

Peter KageyGolf a new OEIS sequence. This is a code-golf challenge. The goal of this challenge is to create an integer sequence that is not in the OEIS using the fewest possible number of bytes. Your program can either output an infinite list, or it can be a function from the natural numbers to the intege...

 
 
1 hour later…
7:55 PM
0
A: Sandbox for Proposed Challenges

NeilDraw a CE mark graphical-output Your input is the scaling factor n. You must output an image of width 82n and height 48n (if you are generating a vector image, it should have that as its default size). The image will be either transparent or white, with the following regions in black: The segm...

 
8:40 PM
@DJMcMayhem are you familiar with Mr. Lissajous?:)
oh ninja'd
@wizzwizz4 what about -0 :D
 
@flawr Eyyyy lmao!
(Powers of two, I reckon.)
 
 
1 hour later…
9:50 PM
@flawr I am now :P
 
From here:
> Others, including “Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,” “(-b +- sqrt(b^2 – 4ac) ) / 2a” and “?” seemed to just mash their keyboard.
Clearly, the author of that article is not a programmer; “(-b +- sqrt(b^2 – 4ac) ) / 2a” isn't a result of keyboard mashing.
 
Anonymous
@Adám Or a mathematician
 
Anonymous
Or someone with a rudimentary algebra education :P
 
@Mego Well, a very naïve mathematician who has never seen computer code…
Actually, that +- is unusual. Looks like pseudo code to me.
Does any language allow +- to mean ±?
 
Anonymous
@Adám No, but when you don't know how to type ± or are restricted to ASCII, +- is one of the closest representations
 
Anonymous
9:58 PM
Usually I see +/-
 
I so love APL's (+,-)
 
Anonymous
That's a pretty good one too
 
It is really cool because it allows any three operations; (+-×) is the difference between the sum and the product, and (,÷+) normalises by scaling to a sum of 1.
 
10:15 PM
@Adám what does it do?
 
@flawr , is concatenation, so it concatenates the result of + with the result of -.
 
so if you apply that to two numbers a,b you get (a+b, a-b)?
 
@flawr Yes. in general if a and b are arrays (any data) and f and g and h are functions, then A(f g h)B is (A f B) g (A h B) and (f g h)B is (f B) g (h B).
 
@Adám are (binary?) functions always treated as infix?
 
This allows us to write the Traditional Mathematical Notation constructs of a±b and (f+g)(x) using a single unified construct.
@flawr Kind of. Functions always take one or more arguments on their right, but may optionally take one or more arguments on their left.
 
10:20 PM
@Adám Do you have to define that when defining a function or does it depend on the context?
 
@flawr When you define it, you can define the function Plus such that a Plus b works, or you can define it such that Plus a b works. Up to you what you find fits best. However, if you define it as infix, then you can use it as prefix by writing Plus/a b
 
Ah I see, that is quite neat, thanks for the explanation!
In haskell you can also define infix operaturs, but they can (due to the currying) only have one left argument
and you can also convert them from infix to prefix and vice versa using () and ``
 
@flawr Well, you could regard the APL functions as being restricted to single left and right arguments, but vectors (lists) are no different from any other data, and can be formed by simple juxtaposition, so multiple arguments can be given on one side simply by making them into a list.
 
ah the lists:)
I think one should mix APL and Haskell to create a very interesting language:)
 
@flawr Actually, you can define a function to be ambivalent, in which case both a Plus b and Plus a b would work. It is quite simple too: Plus←{⍺←0 ⋄ +/⍺,⍵}
@flawr You can make a prefix APL function f into an infix function with (f,) and in the next version of Dyalog APL, f⍤, will do that too.
@flawr Any particular features of Haskell that you think are missing from APL?
 
10:29 PM
I don't know enough (barely any) APL to really answer that - I just learned about so many featuers of Haskell that I've rarely seen in other languages that I really like.
One of the big points for me is the abstraction you can get with typeclasses
which is so similar to how you define algebraic structures in maths
so on the one hand you have this abstract definition and you can prove/derive stuff just from that, and on the other hand you have concrete implementations for which you can immediately apply all that
 
@flawr We should fix your lack of APL knowledge ;-)
 
It still is on my bucket list:)
 
@flawr Sounds interesting. I have to admit that my understanding of Haskell is too limited, but every time I try to understand it more, it immediately goes way above my head. I guess I simply don't have enough haskell to understand Haskell.
(haskell means intelligence in Hebrew)
 
oh that is a fun coincidence:)
Is that maybe where that name comes from?
 
No, I'm pretty sure it is from the name of Haskell Curry, but maybe they had it in mind too.
 
10:40 PM
@Adám I was referring to the first name Haskell, not specifically the language:)
From what I just read it seems Haskel is a Yiddish version of Ezechiel
 
@flawr Maybe, but somebody clearly picked up on the coincidence(?), because the popular Haskell framework, Yesod, means foundation in Hebrew, and both haskell and yesod are so called emanations in Jewish mysticism. (Though haskell is usually called da'at.)
 
@Adám that is interesting!
@Adám It did take me a long time too to get where I am today and I still feel like a newbie, and from what I've heard it is normal:)
 
@flawr That'd be Cheskel. Haskell Curry was born right before the Haskell boom
@flawr Sad. APL has a reputation for a steep (vertical) learning curve, but in reality, people get up to speed very quickly.
 
@Adám well I never really used Haskell it intensively, mainly for golfing. (in case you ever have any questions, there is also a chat))
@Adám I did try to start a while ago but then it turned out I was using the "wrong" tutorial :)
but right now my current occupation requires quite a lot of programming and pondering, so I usually have barely any energy to do any programming in my free time
 
@flawr pointfree.io looks interesting (not that I know what to enter). I wonder how hard it would be to make something similar in APL (which also supports both explicit and point-free coding).
 
10:50 PM
@Adám are you familiar with writing basic haskell functions?
 
@flawr No, even the simplest examples are very confusing to me.
 
E.g. a one argument function can be written as f x = x + 2 or alternatively as a lambda f = \x -> x + 2
 
@flawr What is the difference between a function and a lambda?
 
@Adám A lambda can be anonymous, and is closer to the mathematical definition of the thing.
 
@Adám nothing really - a lambda does not have to be explicitly assigned to a name, but other than that they are identical
 
10:55 PM
OK, APL has such a dual system too.
 
you can even mix and match
f x y=x+y or f=(\x y->x+y) or f x=(\y->x+y)
 
Why doesn't the last one return a lambda?
 
@Adám it does, if you only apply it to one argument
that is the "currying" effect:)
if you have a function that takes more than one argument, it is actually just a function taking one argument and returning another function
 
Ah, I think I get it now.
 
if you have a function in maths that maps to real values to another real value (e.g "plus"), then you usually write it as "plus: R x R -> R"
("x" being the cartesian product)
but with currying this is equivalent to "plus: R -> (R -> R)"
 
10:59 PM
Though highly unusual, APL does allow defining such one-argument function, which returns a one-argument function.
 
So now if you input any of the examples above into pointfree.io you get an alternative on how to write the same function without mentioning any arguments explicitly
 
Anonymous
And that would be (+)
 
Anonymous
Btw: Of Monads and Men is a great room for learning about Haskell
 
Yeah, they all give (+) but why not just f=+ ?
 
Anonymous
@Adám Because + is the infix version. (+) is the prefix version.
 
11:03 PM
@Mego Yeah, mind moving the conversation?
 
@Adám + is considered an "operator" which is infix. To assign functions you need the prefix version
 
Anonymous
You'd use it like f 2 2, so f=+ wouldn't work
 
Anonymous
@Adám I don't think it's doing any harm here. There aren't any other conversations going on here that it is drowning out.
 
Ah, so f=+ is valid, but would require calling e.g. 3 f 4?
 
no, unfortunately we cannot directly assign operators, you always need to convert it to a prefix function
 
11:05 PM
So how do I make f an infix operator?
 
Anonymous
@Adám Backticks
 
and only a few symbols are allowed to be defined as operators, f is not but for example # is.
 
Anonymous
If you have f=(+), you can use it like 2 `f` 2
 
so you could define f=(+) and then call 3 `f`4 or use (#)=(+) and then call 3 # 4
ninja'd:)
I'm sorry, but I just noticed what time it is and that I should get some sleep:)
 
Anonymous
To use an operator as a function (prefix): wrap the operator in parens. To use a function as an operator (infix): wrap the function in backticks.
 
11:07 PM
@flawr Thanks for taking the time! I hope to give back one day.
 
It was a really interesting conversation, but I would have to postpone my involvement to another time:)
 
@Mego So why (#)=(+) and not just #=+?
(#)=(+) doesn't work on tryhaskell.org :-( <hint>:1:4: parse error on input ‘=’
 
Anonymous
@Adám Because operators are not valid sources or targets for assignments. Only functions and expressions are.
 
:-(
So (#)=(+) kind-of "packs" the target into a function but then unpacks (+) into an operator to get the actual value for #?
 
Anonymous
@Adám You could look at it that way, yes
 
11:11 PM
APL allows something similar, but only for arrays.
 
Anonymous
@Adám I think it's some limitation with that site: tio.run/##y0gszk7Nyfn/…
 
Anonymous
tryhaskell.org might only allow expressions and not assignments
 
@Mego Ah, it requires let before assignments \○/
 
Anonymous
Yeah, it only accepts expressions and let-assignments
 
Anonymous
Weird
 
11:15 PM
Yikes, the error messages are overwhelming.
Try e.g. let f=(+) in f
 
Anonymous
Yeah, it wants expressions that evaluate to a value
 
Anonymous
Odd limitation but /shrug
 
Can an anonymous lambda be used infix if surrounded by backticks, or does it have to be named first?
 
Anonymous
Good question - I don't think I've ever tried that
 
Anonymous
My main use for Haskell is golfing, so that's obviously not something that would be useful there :P
 
11:19 PM
tryhaskell.org seems to not like 3`(\x y->x+y)`4
 
Anonymous
I recommend just using TIO :P
 
@Mego Which one? I see four…
 
Anonymous
The one that just says "Haskell"
 
@Mego OK, but now, how do I do 3+4 on TIO?
main = putStr 3+4 doesn't work.
 
Anonymous
I always just do main = print $ whatever
 
11:24 PM
So main always gets run after all definitions have been made?
 
Anonymous
Yep
 
Anonymous
It's the entry point
 
f=(+)
main = print $ f
fails. Is there a safe way to explore?
 
Anonymous
print expects something printable. A function is not printable.
 
So I can't check what the current value of f is?
 
Anonymous
11:28 PM
You can just look at it :P you can't rebind variables
 
Anonymous
I think there's a way to see it in GHCi (interactive REPL)
 
Oh. But like if I want to know what type of thing it ended up as.
 
Anonymous
That's :t in GHCi. Not sure how to do that in a "proper" program
 
Anonymous
Oh, typeOf
 
Anonymous
You need to import import Data.Typeable for typeOf
 
Anonymous
11:31 PM
But it will also complain for your example because there are multiple possible types it could output
 
Anonymous
 
@Mego Sorry, I realised it was getting late. And I also got distracted by Haskell's reporting data types — wanting to see how hard it would be to make something like that in APL. Right, so + only works on integers?
 
00:00 - 15:0015:00 - 00:00

« first day (3171 days earlier)      last day (1671 days later) »