« first day (1907 days earlier)      last day (2935 days later) » 

9:01 PM
Because we're your friends <3
 
adapter AdapterName for SomeInterface<T>{
     void give(T) -> void add(T)
}
I'm also considering making automatic adapters
 
@Haskell people: How does fix (n&k)q=[x|x<-[foldl(\z->(-1)*div((k*z),(1-k)))(q*k-mod(k-1)q)[1..]],x>n*(k-1)]!‌​!0?
 
@QPaysTaxes for computers, not people
 
When it takes z in the div it says z is for infinite type
@QPaysTaxes t(-__-t
 
@QPaysTaxes ಠ_ಠ
 
9:03 PM
actually, I need it to have a name
 
So is telling people to stop using a language when they're asking for help
@QPaysTaxes Mine too :P
I use middle fingers as a joke among friends
 
@Sherlock9 ಠ_ಠ
2 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
@QPaysTaxes ಠ_ಠ
 
So to me, it was friendly gesture of annoyance. I apologize for not making that clear
 
We're good people, don't worry
 
@QPaysTaxes Well, we bash a few languages, but I've never seen Haskell bashing so I didn't know if it was serious or not
Fair enough XD
 
9:09 PM
Assembly is perfect.
 
TIL Assembly is the perfect language.
 
"perfect"
 
MOV ELENDIA, PERFECT_LANGUAGE
SEGFAULT
 
That's why I like semicolon comments
 
cat
@QPaysTaxes :P
 
9:12 PM
Hey
 
cat
Hey!
 
@AlexA.: Just early-voted for Bernie since I'll be out of state on primary day. :D
 
0
Q: Federal income tax calculator for procrastinators

Digital TraumaToday is Tax Day! Oops. Well, today is tax day if you are a resident of Maine or Massachusetts. So you're probably still completing your return and need a calculator for when you get to Line 44. Given an input of taxable income (US$, accurate to 2 decimal places) and a string representing fil...

 
@QPaysTaxes I can't vote for him though.
I would actually slightly prefer that Trump be the nominee over Cruz because he is so obviously incompetent that I'm sure he wouldn't hold office for very long.
 
9:20 PM
@QPaysTaxes Hi
 
cat
Does anyone want an invite to retrocomputing.stackexchange.com?
 
You know you can get into private betas without having committed, right?
 
@cat What is this?
 
@cat Invites are actually not necessary. Go to the Area 51 page and then click the "Visit" button.
 
@QPaysTaxes You don't need one
 
cat
9:21 PM
:o
 
It's been an open secret for a couple years now, I think.
 
cat
0
Retrocomputingretrocomputing.stackexchange.com

Beta Q&A site for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear.

Currently in private beta.

there you go :P
 
IIRC the reasoning was basically "If you're willing to go to that much effort, there's no real reason to stop you."
 
cat
"Where can I find software for the PDP-6?"
WHERE DO YOU GET A PDP 6
I WANT 1 2 :C
 
no, it's one two three
 
cat
9:22 PM
one two see
 
Yeah I want to see that, too!
 
cat
"We are planning to build a reconstruction of the PDP-6." There you go.
 
another design question: I'm separating "queries" (gets data) from "commands" (performs actions). That said, its important to know whether commands succeeded. Therefore, does returning an Optional<Error> make sense for a command?
 
In Rust, there's a Result<T, E> type, which returns Ok(T) on success (i.e. the regular return value) and Err(E) on failure
(so your Optional<Error> would become a Result<(), Error>, with the unit type ("nothing") as T)
 
is there a real reason you need a return value of commands?
(outside of convenience)?
 
9:32 PM
I'm prolly missing something, but why is this on main: codegolf.stackexchange.com/q/78073/31343?
 
@Maltysen read the first paragraph
 
cat
Whoa, I have 101 rep and I can see votes and downvote. This is cool.
 
@NathanMerrill if you know that you'll never have to return anything from them, then sure, Option<Error> would also work
 
@Doorknob oic
 
right, but this is a language, so I don't know all of the possible use cases
:(
 
9:35 PM
@LegionMammal978 This is a reference to what that random NPC in Half-Life 2 says, right?
@El'endiaStarman \o/
 
@QPaysTaxes but isn't that convenience for Array.peek and Array.removeFirst ?
I'm ok with surprising people
 
@NathanMerrill what about generators? next will have side effects
 
@Doorknob What happens if you don't fulfill a commitment? Will SE comes over to my house with a shotgun?
 
@flawr haha amazing
 
@quartata through your window, yes
 
9:37 PM
And it's not a reference to that rap song
 
@Doorknob shit better learn more lojban so I can answer questions
 
@Maltysen I'll have built in support for generators (using yield). But I think your point still stands with Iterators<>?
 
@quartata What happened to your avatar?
 
hmmm, you're right
 
:(
 
9:38 PM
even with generators, multiple queries don't return the same thing
 
@quartata .i ji'a do kakne lo nu preti cusku
 
2 hours ago, by Mego
@quartata Did your avatar get hit with radiation that caused it to mutate?
 
@NathanMerrill yeah I often confuse the two. I meant the thing in Python that uses next()
 
@NathanMerrill BOO!
 
9:38 PM
gotcha
Oh misread, you said you're okay with surprising people, not with people surprising you
 
I should really bookmark this lojban dictionary
 
It's great and does all things garbage and makes no sense >_>
 
I don't want to be hypocritical, though
 
@quartata where did that quart of potatoes go and what did you do with him?
 
Anonymous
@QPaysTaxes I'm somewhat free
 
9:40 PM
@Mego And somewhat enslaved
 
@AlexA. Why are you frowning? I thought you hated the old avatar
 
Anonymous
I am relatively sure that I will not get killed AFKing in Lunaris 2
 
@quartata I love you no matter what.
 
@Maltysen itsa me
 
@quartata why did you kill him, pikachu?
 
9:41 PM
This avatar is both a drawing from a Brain Age TAS and exponentionally cuter so I thought it was a double winner
 
Anonymous
The static avatar was the best
 
Anonymous
And by the best I mean it was awful
 
@quartata hmmph. to prove its really you, transfer all your rep to my account :P
 
How does that prove anything?
 
Don't think about it, just do it
 
9:44 PM
if you have nothing to hide, you have nothing to fear (except losing all your rep)
 
cat
me: *goes back to Facebook for 5 seconds*
me:
me: wow, this is dumb.
 
cat
me: *comes back to TNB*
me:
me:
me: no i'd rather do this than something productive
 
@QPaysTaxes yeah that last line…
 
@flawr Hahaha I've seen that before but I didn't see it in here.
@cat I'm not generally a fan of Facebook (though I work in the same building as their Seattle office) but I end up using Messenger often.
I turned my brain off long before I got home from work.
 
cat
9:50 PM
@AlexA. I used to use it a lot cause relationship, but now I use Stack Exchange too much and FB not at all :P
 
hmmm, I think I found a good use case for not having command query separation
 
@cat Relationship? Pfft. The only relationship you need is with golfing.
 
cat
@QPaysTaxes no, it's the sadder one, but it's okay c:
 
@NathanMerrill oooo do tell
 
cat
9:51 PM
@AlexA. pfffFT
 
Order.submit() should return a receipt, which is more than just a "it worked"
basically, information about the command needs to be returned
which includes information in the failure case and information in the success case
 
That moment when you engage someone regarding an idea they have but soon realize that you missed so much of the prior discussion that you have no idea what's going on.
What is Order.submit()? Is this related to a restaurant somehow?
 
no, its an example
CQS basically says that there should be two types of functions, Commands which do something, but return nothing, and Queries that return a value, but do nothing
 
@AlexA. yeah he's starting an online restaurant
(not really, he's not actually doing that)
 
I was going to allow Commands to return Optional<Exception>
but the problem, is that if you wanted to submit an order, you often need information about the submission itself
 
9:54 PM
@NathanMerrill well the response to your example is that instead of relying on return values to get you that info, you do Order.submit() and then call Order.didSucceed() for the info
 
whether or not it was successful
 
just like when you broke apart Array.pop
 
@Maltysen while its possible that way, it isn't good design.
the reason is that an Order then has two "states"
(or more)
 
@NathanMerrill I'm having a hard time mentally separating those. I can only think of a query like a SQL query where you're looking at the data you have but you haven't affected the database in any way (assuming there's no create, drop, whatever)
 
@quartata now I will no longer confuse you with apsillers
 
9:56 PM
a query is basically a purely functional function
but yes, very much like a SQL select
 
@Maltysen I keep reading Array.pop as Array.poop because apparently I'm both illiterate and 12.
 
@AlexA. array.poop is like array.pop except that it poops out the value from the end of the array :P
 
@NathanMerrill Can you give an example outside of SQL? That's what I'm having trouble with.
 
@AlexA. Array.get(1)
 
@El'endiaStarman whoa
 
9:58 PM
that would be a query
 
@AlexA. basically by query he means pure function
 
@quartata your chat profile still says "yes hello this is glider"...
 
correct
 
Ooooooh okay
 
as long as it doesn't affect the state of the program, its a query
 
9:59 PM
That makes sense
 
@QPaysTaxes what array would have…
 
that said, does it make any sense to separate queries from commands anymore?
now that commands can return whatever they want?
 
@NathanMerrill oooooh idea
 
hmmm?
 
how about instead of having "return values" you can mentally separate them by giving commands a getReturnValue query
like Array.pop().getReturnValue()
 
10:03 PM
so, commands, return a Query?
 
yup
 
(where a query is a first class function)?
 
I don't understand the advantage
 
I'm not sure if that's a good idea. I mean, lets say I have a Receipt object
 
@NathanMerrill you would still use a return statement, but if you say that the thing is a command, to get the return value you would have to use the query
 
10:04 PM
and an Order object
 
Hello
 
my Order.submit() would have to create a Reciept object, then create a function that simply returns the created receipt object
 
cat
@MarsUltor hi!
 
@NathanMerrill well that would be done automatically
if you designate .submit() as a command
all return statements would be absorbed by the getReturnValue query
 
so, if the "wrap in a query" is done automatically
then what advantage does it provide the caller
they basically would have to do Order.submit().get()
 
10:06 PM
I just thought you mentally wanted to separate commands and queries
 
@Maltysen it breaks the concept of CQS, (because the command is still returning something)
hmmm. there's got to be a better way of doing this
because status is currently anything
returning a bool doesn't work
 
that's a good idea
 
but sometimes commands need to return information about their success
which is more than just a string
 
Include a dictionary or something.
 
@El'endiaStarman not type safe
for example, an Order.submit() should return a Reciept, which contains aggregated data of the submitted data
 
10:11 PM
@NathanMerrill A type safe dictionary.
@NathanMerrill Doesn't that break CQS?
 
@QPaysTaxes 2 lines above
@MarsUltor Yes
@QPaysTaxes no it doesn't. Or it shouldn't.
it contains the raw data, but not the aggregate
for example, say I did Order.submit(Country)
and it did all of the calculations of taxes, and other country specific stuff
all of that "processed data" needs to be submitted
so, while its possible to get around it by storing the "processed" data in a temporary variable, its basically a hack
 
If you want CQS, then you need Order.process and Order.get or something
@NathanMerrill Just make Order an object?
 
it is
 
Then make process change itself and get return itself?
 
@MarsUltor I was actually going to do this for a long time
 
10:18 PM
Why not anymore?
 
but then I realized that (1) I needed exceptions, and (2), people would start doing Order.add().process().getSomeValue()
I've never heard of a CQS language returning itself
 
@QPaysTaxes holy shit that globe one
 
where commands return the containing object
 
I'm a big proponent of writing clean code, and languages that make you write clean code
 
10:23 PM
@QPaysTaxes I look up to this guy.
 
which is why I wanted to do CQS
 
^^^
@Downgoat js golfer alert
 
Command–query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language. It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both. In other words, Asking a question should not change the answer. More formally, methods should return a value only if they are referentially transparent and hence possess no side effects. == Connection with design by contract == Command–query separation is particularly well suited...
Yes it is
This is based on CQS
 
@QPaysTaxes maybe. I'm still not convinced that all code shouldn't be CQS
but I need to figure out a way to do it that makes for clean code
 
CQS should be a choice
CQS pretty much prevents fluent interfaces
 
10:25 PM
@QPaysTaxes CQS isn't about cleanliness, its about unexpected side effects
if I make Array.get(), I should expect that the array is unchanged
Maybe? I'm not convinced that I can't get it to work in a clean manner
I'm not sure how, but I'm going to keep thinking about it
 
10:40 PM
pls halp how delete 5 gig .txt file
i tri and computer freez
 
@EasterlyIrk sudo rm -rf /
 
okai thx brb trying
 
Don't actually do that
 
omg pls halp i kill all comp
 
Use liveCD
 
10:41 PM
@MarsUltor now you say? :P
no
fortee
 
No juic?
 
IT NO WORK
@MarsUltor yah juic juic of mashed up files juic
pls halp
 
@EasterlyIrk Hit delete and wait.
 
@MarsUltor sudo rm -rf --no-preserve-root /
 
1
Q: Linear Independence

poi830Given a set of vectors all of the same positive finite dimension, output a falsey value if they are linearly dependent and a truthy value if they are linearly independent. A set of vectors v1, v2, ... is linearly dependent if for some scalars a1, a2, ... not all equal to 0, a1v1 + a2v2 + ... = 0...

 
10:49 PM
@NewMainPosts I'm surprised we haven't had that before.
 
yeah i was too
 

« first day (1907 days earlier)      last day (2935 days later) »