« first day (1657 days earlier)      last day (3306 days later) » 

4:00 PM
That's a crappy way to maintain a spec
 
@sehe I've had about three goes at Accelerando and only got halfway through, so I just started with the Laundry novels. They're a little bit more accessible, and there are some fantastic nerd in-jokes.
 
@orlp Nice
 
@orlp Nice, I wrote a little script that does this about year ago.
For uni assignment.
Never used it seriously though, because I'm on Windows.
 
Aright, gotta go. Thanks for the validation though :-)
 
For the slighest moment I thought it said "Fork Me On Github" there :)
 
4:01 PM
"Fuck me on github"
 
user1804599
@fredoverflow ???
 
does anyone know what the implications of this are?
 
@orlp I think that's a third repost.
 
I posted it before I think as well
 
user1804599
4:02 PM
If you make the implementation the spec then "spec" is for "speculation" instead of "specification".
 
I just don't know what the implications are
does it mean we'll finally get a C++ debugger that doesn't suck that doesn't come with a stupid IDE I don't want to use?
 
@orlp It means VS starts being usable with everything.
 
but I don't want to use VS
 
@orlp Ironically:
 
Which puts it light years ahead of the competition.
 
4:03 PM
[sehe@basehews /tmp]$ unzip -t ~/Downloads/VSCode-linux-x64.zip | cut -d/ -f1 | sort -u
Archive:
No errors detected in compressed data of
    testing: Code                     OK
    testing: content_shell.pak        OK
    testing: Credits_41.0.2272.76.html   OK
    testing: icudtl.dat               OK
    testing: libchromiumcontent.so    OK
    testing: libffmpegsumo.so         OK
    testing: libgcrypt.so.11          OK
    testing: libnotify.so.4           OK
    testing: license.txt              OK
Great. Still a lot to learn, MS
 
hmm
will we see open source windows in the next 10 years?
 
At least they got decent fonts selected out of the box
@orlp Nope
 
@sehe Why?
 
@sehe I don't know when, but I think at some point Windows will go full redhat
 
Gut feeling. The fact that some high-bobo said so today seemed like pushing it. And that reinforces my intuition
 
user1804599
4:05 PM
@AlexM. Use JNA, not JNI.
 
the big market isn't going to be with private consumers anymore
 
user1804599
JNI is terrible.
 
user1804599
And JNA doesn't require a separate non-Java build step.
 
@orlp That would never be comparable though. I understand you mean the business/licensing model
 
@sehe I meant just giving the OS open source, and selling support to businesses
 
4:06 PM
@orlp I understood. Is what I meant
 
user1804599
> LF
 
user1804599
wat
 
@rightfold you can't call Java from C with JNA
 
@orlp No.
 
user1804599
@AlexM. Why would you want to call code written in terrible language A from code written in terrible language B?
 
4:08 PM
I disagree. Noone but you thinks that 20/100 might mean something other than twenty hundreths in context. I reverted your edit as it made things less readable for no benefit. — ikegami 1 min ago
moron
 
@rightfold why would you recommend to solve a problem with something that doesn't solve the problem?
 
like, I can't be the only one that just wants a (1) decent (2) graphical (3) standalone debugger for C++
I like to do my editing in vim
 
@orlp 3 x YES
 
I don't want your idiotic IDE that needs all kinds of project files, settings and bullshit I don't want to deal with
 
@orlp But that's the different proposal.
 
user1804599
4:09 PM
@AlexM. Because I'm a Python programmer and that's what Python programmers do.
 
@rightfold Why bother living then?
It's terrible.
 
@orlp me too.
@milleniumbug from what?
 
if it were for me to decide
I'd decide that the only platform worth supporting is iOS
 
@sehe That's different from "VS opens the GDB/LLDB engine"
 
because of C++ <-> Obj-C++ interop
 
user1804599
4:10 PM
Objective-C++ is nice.
 
user1804599
Apart from the auto rules, unless they fixed that.
 
@milleniumbug really. i don't think so. i.imgur.com/i83kyxT.png
Need to run
 
@orlp There was talk about that. The problem is open sourcing Windows, and require multiple rocket and nuclear engineers to figure out the build system.
 
user1804599
Last time I used it, given auto x = [[NSArray alloc] init];, x was inferred to be id instead of NSArray*.
 
@orlp I did a research some time ago, and all of graphical standalone debuggers have this stupid dependencies on the platform dependent stuff.
Which is retarded
 
4:12 PM
when I said graphical I don't necessarily mean native windowing
it could very well be text-based like vim
as long as it's not like fucking gdb
where you have to run commands
 
@sehe Wish they'd pick a fucking font.
 
user1804599
???
 
4:15 PM
>>>
 
user1804599
>_>_>_<_<_<
 
Xeo
wheeee, home
 
user1804599
How do you decide whether you have a Monad, Applicative or Functor constraint?
 
user1804599
Consider this function:
 
user1804599
authenticate :: (Functor m, Monad m) => (EmailAddress -> m (Maybe User)) -> EmailAddress -> Password -> m (Maybe User)
authenticate findUserByEmailAddress emailAddress password =
    (>>= authenticate') `fmap` findUserByEmailAddress emailAddress
 
user1804599
4:18 PM
I could just as well remove the Monad m constraint.
 
user1804599
However, may I ever change the implementation in a way that requires monadic bind, I'd be screwed as it'd break the API.
 
> Display name may only be changed once every 30 days; you may change again in 17 hours
 
user1804599
Also, I can't think of a functor that isn't a monad.
 
Xeo
Set?
Wasn't there something about that?
 
user1804599
Set isn't a functor.
 
user1804599
4:26 PM
Haskell's type system isn't expressive enough for that being possible.
 
user1804599
fmap would need additional constraints.
 
> Haskell's type system isn't expressive enough
Say what?
 
user1804599
Ideally sets wouldn't require Ord and all types would be Eq and hashable.
 
user1804599
However this isn't possible to do in a Turing-complete programming language.
 
> all types would be Eq and hashable
Hello Java
 
4:28 PM
@fredoverflow Hello Java : public Smalltalk.
 
user1804599
@fredoverflow Ok, let me rephrase.
 
user1804599
Ideally sets wouldn't require Ord and all types would be Eq and hashable with implementations that make sense.
 
By the way, I realized using the Java identity as a "hash key" does not provide any memory benefits over using an explicit ID field.
 
user1804599
enum class Certainty {
    Definitely,
    DefinitelyNot,
    Perhaps,
};
 
user1804599
This would be useful!
 
4:30 PM
You save 0 space :-(
 
user1804599
@fredoverflow Just don't do it. It's silly.
 
user1804599
Use an explicit ID field.
 
user1804599
It's much more versatile.
 
user1804599
@fredoverflow You save the space of the ID field.
 
I was hoping to save that 1 word.
@rightfold No, you don't.
 
user1804599
4:30 PM
You definitely do.
 
If you call hashCode on an object, then the object size grows at the next GC cycle.
Because the object has to remember the result.
 
user1804599
So you save space until a GC cycle.
 
great :)
 
@LightningRacisinObrit the point was this is on Linux. Usually font selection and rendering is where the Linux desktop experience breaks down badly
 
user1804599
@fredoverflow You still save space.
 
user1804599
4:32 PM
You don't have to create ID objects.
 
@rightfold So you save space until it actually matters.
 
If I use a simple increasing ID, I don't even need a Map, I can just use a Vector.
 
user1804599
An ID object has at least two words and a hash code.
 
user1804599
You can make ID a subtype of AnyVal.
 
user1804599
Then it should be cheap.
 
user1804599
4:33 PM
@fredoverflow No.
 
@sehe Anything that implies that the Linux desktop experience only breaks down in one place is clearly mistaken. :-) (though in fairness, if you substitute "Windows" for "Linux", the same remains true).
 
@rightfold A Vector is a Map from Int, isn't it?
 
user1804599
You'll likely be generating and discarding millions of IDs.
 
user1804599
No.
 
user1804599
Vectors are ordered and have no gaps.
 
user1804599
4:33 PM
Maps are unordered and keys don't have to be contiguous.
 
user1804599
Vector[Int, T] is a function from Int to T, like Map[Int, T].
 
user1804599
But the invariants are completely different.
 
Fuck your invariants, I'm gonna use a vector.
 
user1804599
If vec(0) and vec(2) don't throw, vec(1) won't throw either.
 
user1804599
If map(0) and map(2) don't throw, map(1) may throw.
 
4:35 PM
I just make the vector big enough for all IDs.
 
user1804599
Also, merging vectors like that is a pain.
 
user1804599
And you need a vector of options.
 
@rightfold That means he can't substitute a map for a vector. It doesn't prevent substituting a vector for a map though.
 
user1804599
Merging maps is easy using ++. ++ on vectors means concatenation which will break all your IDs.
 
user1804599
What you want is a mapping from arbitrary to arbitrary, and Map is the tool for that.
 
user1804599
4:37 PM
That the IDs are implemented as integers is an implementation detail.
 
user1804599
If you leak that then you have a leaky abstraction.
 
Your mother is a leaky abstraction.
 
user1804599
My mother isn't an abstraction, so you're wrong.
 
Why would I even need to merge?
Are you thinking parallelism?
 
@BartekBanachewicz that is php right?
 
4:38 PM
@fredoverflow His mother is concrete--solid concrete.
 
user1804599
eh well
 
user1804599
unless you want mutable maps
 
No, teaching is better. You just did a shit-poor job of teaching — ikegami 6 mins ago
lol
 
@MarcoA. rotfl
@MarcoA. rotfl
 
4:39 PM
@rightfold I'm not hardcore against mutation.
 
user1804599
def resolveType(expr: Expr): Map[ID, Type] = expr match {
    case AddExpr(a, b) =>
        var types = Map[ID, Type]()
        types ++= resolveType(a)
        types ++= resolveTypes(b)
        types(expr.id) = IntType
        types
}
 
user1804599
@fredoverflow ????????????????????
 
Amsterdam!
 
user1804599
@R.MartinhoFernandes Did somebody steal your bike yet?
 
19 to repcap
@R.MartinhoFernandes well done
 
user1804599
4:41 PM
You can find new ones in the canals.
 
I didn't bring a bike.
 
user1804599
Steal one!
 
So, now what? Drugs and whores?
 
val a = new Array[Type](numberOfExpressions)
for (x <- 0 until numberOfExpressions) {
  a(x) = resolveType(expr(x))
}
 
R. Martinho Lannister
 
4:42 PM
We plan to rent some bikes.
 
@rightfold ...Or something, I dunno :)
 
user1804599
Hmm, Const is a functor but not a monad.
 
How does renting drugs work
 
user1804599
Just use a map.
 
user1804599
It's semantically what you want.
 
4:43 PM
Well if he's using a bike then he's on the road and can just follow signs, probably
 
user1804599
If you want to store it as a vector, implement the Map trait with a vector.
 
Should I rewrite the thing in Clojure? :)
 
user1804599
Sure, why not?
 
My parens won't let me.
6
 
user1804599
4:44 PM
In Clojure you can just add the stuff to the AST.
 
awesome!
 
user1804599
Since records can be extended with arbitrary keys and keys can be namespaced.
 
Who AST you?
 
user1804599
Say the type checker is in the tc namespace:
 
user1804599
4:45 PM
user=> (ns tc)
nil
tc=>
 
user1804599
Then use :: instead of : to namespace the keyword:
 
user1804599
tc=> :type
:type
tc=> ::type
:tc/type
 
user1804599
And now the fun can begin:
 
user1804599
tc=> (->AddExpr (->IntExpr 1) (->IntExpr 2))
#ast.AddExpr{:a #ast.IntExpr{:x 1}, :b #ast.IntExpr{:x 2}}
tc=> (assoc (->AddExpr (->IntExpr 1) (->IntExpr 2)) ::type Int)
#ast.AddExpr{:a #ast.IntExpr{:x 1}, :b #ast.IntExpr{:x 2}, :tc/type #tc.PrimitiveType{:name "Int"}}
 
@JerryCoffin good that I didn't imply this :)
 
4:51 PM
is visual studio code visual studio not for code?
 
@sehe You may not have intended to, but "Usually font selection and rendering is where..." implies that this is the sole place. To say it's one of many you'd want to say something more like: "X is one place that ..." or just "X often works poorly..."
 
@orlp showcase video on Mac OS X
that isn't great for a company which makes surfaces and Windows
 
user1804599
> A breakthrough in the medical world: scientists have developed a drug with a name that can be pronounced. The drug is called 'pill' and is meant for people diagnosed with "sick."
 
0
A: prevent write on console at keypress linux c++

Andrew HenleUse getpass(): The getpass() function opens the process' controlling terminal, writes to that device the null-terminated string prompt, disables echoing, reads a string of characters up to the next newline character or EOF, restores the terminal state and closes the terminal.

dafuq
 
4:53 PM
@rightfold Was Clojure your 1st or 2nd Lisp?
 
user1804599
@fredoverflow My first.
 
user1804599
And only, so far.
 
Interesting. And what made you pick it?
 
user1804599
I'm not interested in any other lisps.
 
user1804599
There was an implementation of it that could be found easily.
 
user1804599
4:54 PM
Searching "Scheme implementation" gives millions of results and tutorials on how to implement Scheme in Haskell.
 
Do macros behave the same in all Lisps? Are they part of core Lisp? Are they "standardized"?
 
user1804599
I don't know.
 
user1804599
Wait, I have used another lisp.
 
user1804599
I've used Emacs Lisp to configure Emacs.
 
user1804599
4:57 PM
Macros in Clojure are simple.
 
user1804599
Macros are called at compile-time and the return value is used in place of the call.
 

« first day (1657 days earlier)      last day (3306 days later) »