« first day (2831 days earlier)      last day (2339 days later) » 

00:06
No
Much appreciated rant. Maybe you can clarify a bit some of the wording. In particular the last sentence is a bit terse and I'm not at all sure what it meant to say. — sehe 2 mins ago
I have noticed Hans being considerably more negative than usual lately.
 
7 hours later…
07:12
> async turtles all the way down until you get to Main()
and?
nwp
nwp
void _start() {
    async(main, async(get_argc()).get(), async(get_argv).get()).wait();
}
not my fault your languages have horrid syntax
main <$> get_argc <*> get_argv
nwp
nwp
_start -> async main >>< get_argc |"" get_argv <&%$> | $
Best syntax
what's that?
looks like arbitrarily made up or Perl
which come to think of it is basically the same
@nwp the problem with this kind of code is that it assumes that simple syntax stays readable when the code complicates
it's a common fallacy imho
when people expect syntax or design or system to scale linearly
also you forgot some parens
nwp
nwp
I did? Well, you forgot the async. Or is that supposed to be implicit in the operator?
I vaguely remember a list of language design fallacies. "You think syntax matters" is one of them.
I don't struggle with syntax. function(args) is simple enough. I currently struggle with not being able to express thread safety mechanisms properly.
(and no, making everything (implicitly) const is not a good solution)
Also I want Qt Creator or the code model plugin or whatever makes the squigglies to stop bugging out :(
nwp
nwp
07:42
64
Q: Sugar daddy wants my online banking login info to make deposits — is it a scam?

anonymousSomeone is offering to pay me in a sort of sugar daddy/sugar baby arrangement. They want to make online deposits to me, and they're asking me for my online banking username and password. Is that information alone enough for them to be able to take my money out of my account, or am I safe?

naah, couldn't possibly be
@nwp what's wrong with it?
it's realistically the only way forward and everyone seems to be following suit
so far noone has presented a better model for concurrent computations than immutability
nwp
nwp
Python did. Simply run only 1 thread at a time. Trivial to follow and works fine.
@nwp calling python threads "fine" is a huge overstatement
besides, immutability bring lots of other tangible improvements to the code other than easier concurrency
So yeah, I'd say making everything implictly const is a perfectly good solution.
nwp
nwp
It just has the drawback of requiring brainfuckery to express simple counters.
@nwp That's false.
Such assumptions typically originate from people who start learning in languages with implicit mutability.
Just because expressing counters in immutable contexts is different to what you've learned in the past, doesn't make it "brainfuckery"
I'd say it's a very funny definition of brainfuckery if you consider e.g. understanding the runtime behaviour of your program with regards to data mutation that.
nwp
nwp
07:55
Well, my simple mind understands mutability from every day life. It makes code easy because it mirrors reality. Once I lose that simple model everything becomes much more difficult.
4 mins ago, by Bartek Banachewicz
Such assumptions typically originate from people who start learning in languages with implicit mutability.
computers model reality in a certain way. You've been taught to model reality with mutable data.
That's by far not the only, or "most intuitive", or "simplest" model there is.
nwp
nwp
@BartekBanachewicz Basically all people started learning languages with implicit mutability. That sentence says nothing.
@nwp There's plenty of people who didn't.
Maybe I should rephrase
Those assumptions originate from people who never got out of the zone they learned in.
So they start learning, they see a way to model reality, take it in (which is never "intuitive" or painless as some people seem to think) and then settle with it
I'd even say that for people who only know one paradigm, that paradigm might well be "intuitive" because intuitively that's the only one they'll go for, because that's the only one they know.
Really the only way to know is to learn, understand and practice both.
Morning
As a personal disclaimer, I am totally open to mutability as a concept at systems' scale. OOP makes a lot of sense when designing large systems. But in lower layers, it quickly loses its benefits and loses to FP overall.
@Morwenn it's late already
08:04
still morning v0v
nwp
nwp
I should pick up haskell again. It was no fun when I played with it some months ago, but I think that was just because the tutorial felt like it just kept repeating "See how great immutability is?" when my answer was always "no, it's terribly limiting".
@nwp maybe you should try writing some "real world" haskell
2
You: Haskell is too academic Me, at my day job: writes the shittiest, hackiest haskell to do random "real world" shit, taking advantage of nice libraries and type safety
this is what I meant
nwp
nwp
I need more basics for that. If you can barely concatenate 2 lists and didn't even get to the almighty fold expression, writing actual programs is not feasible.
not necessarily
you won't understand everything as deeply as someone with good basics and it might involve some more copy&paste
but some people seem to learn better that way
and also it's refreshing to sometimes just whip out IORef and write totally imperative code with mutable state in a language we all know makes it impossible to do so :)
also
fold is a function, not a special syntax thing like in C++
so once you understand the concept, it's just about looking at its interface
nwp
nwp
I thought std::accumulate was basically fold.
I watched this talk which was kinda fun. But ultimately I did not understand why you cannot concatenate an iomonad thing with a regular string and get an iomonad back.
Somehow that being a syntax error was super important and I don't know why.
Ven
Ven
08:22
Hi
@nwp huh?
nwp
nwp
@Ven It's here + 20 seconds. "abc" ++ readfile "/etc/passwd" must for some reason explode and not simply return typeof(readfile "") with the correct runtime-determined value.
Ven
Ven
@nwp do you know of Maybe?
(I'm making a parallel)
nwp
nwp
I've heard that it's essentially std::optional. A thing that may or may not have a value, to be determined at runtime.
Ven
Ven
Basically.
Let's say we have f that's Maybe String (just a value). Would you expect "abc" ++ f to work?
nwp
nwp
Ideally yes, and if the value doesn't exist it just gives you an empty Maybe back.
Ven
Ven
08:33
that's absolutely insane
nwp
nwp
Not so ideally you slap a .get_value in there which either works or produces some kind of error.
Ven
Ven
@nwp You can do that but that's unsafe. Haskell asks you to be mindful about what can and can't error.
@nwp that's literally fmap?
a :: IO String
b :: String

c :: IO String
c = fmap (++ a) b
of course this is just one way to write c and there are many others
@nwp Doing that would be unsafe. Since readfile is an action, you need to lift the ++ part up, or bring the readfile result down:
Ven
Ven
let's say we have std::future<string> readfile(std::string const&). Do you just expect to be able to std::cout << readfile("/etc/passwd");?
nwp
nwp
Why is that unsafe when fmap does the same and isn't?
08:47
@nwp fmap is a lift up
nwp
nwp
Ok I don't know what "lift up" means.
in which you explicitly state that you want to treat the ++ part as an IO action of sorts
@nwp lift is generally "adding context". So a pure value turned into an action that returns that pure value is "lifted" to that action.
nwp
nwp
@Ven I would like that to compile, but I understand that you have to slap a .get() to the end.
Ven
Ven
So if you understand that why does "abc" ++ readfile "/etc/passwd" not compiling surprise you?
@nwp that's actually the opposite way of "lift". It's "forcing" the expression to leave the action and turn into a pure value.
either way you choose, it has to match up
what you proposed was mixing different levels of contexts
in mainstream languages it's common to bring e.g. futures to raw values and then go from there
Haskell typically keeps the values lifted throughout the entire expression
nwp
nwp
08:52
So essentially you have runtime values and compile time values and you can't mix them, you must explicitly convert and implicit conversions are bad.
Ven
Ven
no
a std::string and a std::future<std::string> are both runtime values
nwp
nwp
I'm not seeing the property to categorize values by then. Values now vs values at some point in the future I suppose, but I don't see why you want them strictly separated.
Ven
Ven
Values now vs Values maybe vs Values later vs Values wrapper vs ...
The great thing is that Haskell has things to deal with all of them the same way. It just asks you to take notice of having a values vs a "lax".
09:11
@nwp There are multiple ways in use, and all of them have their uses
the first one you typically learn is "pure" vs "IO"
Maybe is the 2nd thing
nwp
nwp
For me it seems obvious that combining a "pure" with an "IO" produces an "IO", but I guess you eventually learn that that is bad and it must be made explicit.
wait
I need to rephrase because the answer drifted away from what I meant I guess
assuming you had what you wanted, you could write code like someaction ++ somepurevalue
then by looking at it you might assume that someaction is actually pure
by requiring the lift, you clearly see which parts operate at which contexts
and Haskell makes it exceptionally easy to combine pure values with contextful ones anyway
Contextful ones are Functors, Applicatives and Monads typically, and that gives you a loooot of way to use them
09:51
@Mysticial anandtech.com/show/13059/… mixed optane system
10:40
@nwp since presumably you also want "abc" ++ "def" to work, that means that at the end of the day you are advocating for some sort of overloading-style polymorphism/subtyping/what have you feature---one thing about these, independently of opinion or taste, is that they tend interfere very poorly with Hindley–Milner inference
nwp
nwp
11:40
I'm gonna assume "Hindley–Milner inference" simply means type inference.
@nwp that sounds like a mistake
it means "good type inference"
as opposed to "C++ type inference"
nwp
nwp
And yes, I want operators to be overloaded properly. I would not want to use a language where for example + is not overloaded for all kinds of types. ++ should concatenate anything that has obvious concatenation semantics and I would argue that concatenating the readfile monad and a string is very obvious.
@nwp Haskell has no ad-hoc overloading
you can't overload a term that hasn't been defined to be parametric in the first place
nwp
nwp
11:46
Telling me that no, the concatenate operator in this case is fmap is very disappointing and annoying. That's like std::is_same_v-level of badness that I thought we wanted to get away from.
@nwp I don't think you understand the consequences well enough yet
Observing fmap within this narrow context isn't the full picture
After you see how Functor instances for other types look like, and compare them to Applicative and Monad instances for IO and others as well, it starts to click together
IOW, you get waaaay more than you're ready to ask for at this point
nwp
nwp
Except consistent syntax :P
@nwp what do you find not consistent?
I'm not saying that Haskell's syntax is perfect, but it's pretty good imho
it's kinda important to note which parts of the syntax are just libraries and idioms, btw
nwp
nwp
@BartekBanachewicz That I have multiple syntaxes to concatenate stuff when there should be a simple concatenate function / operator that works on everything concatenatable.
@nwp A string and an IO action producing a string aren't concatenable and that's the point
you could write such a function, but there's really little point in using it (and that's where I presume your problem lies)
nwp
nwp
11:51
Also now (hours ago) that ven mentioned it I do think std::cout << std::future<T> not compiling when std::cout << T{}; compiles is bad.
@nwp what I was getting at is the larger picture. it’s not too reductive to say that Haskell was conceived as an ML-like language (i.e. steeped into HM inference), except non-strict---and this vision still lives on and informs the language design today
@nwp for one, I think you're overstating the importance of convenience of working on IO a specifically
You don't want to work on IO when you can help it
so in the other direction you might want to think of a language with the "very obvious" (as you put it) properties you want: but the result would not look like Haskell
and for general cases like Maybe your operators might not have obvious implementations
for IO String it seems kinda obvious what should happen
but for Maybe I can see at least two possible implementations
and then it completely breaks for lists
so in the end you end up with functions for specific monads, which yes, do exist, but again, typically haskell programs should make use of the more generic concepts when possible
you need to write Haskell when you're writing in Haskell if you want to stay sane. Trying to write your favorite language in Haskell will never be as good as writing your favorite language in your favorite language :P
@nwp the takeaway that I want to present to you is that it's fine to ask 'why doesn't language X have Y'; but in considering possible answers I urge you to readily jump to an attitude of 'the designers of language X must be ignorant/incompetent'
whereas I think that approaching the question under the angle of "what were the choices and trade-offs that led to the situation" leaves anyone open to learn new things
or at worse, you can always shrug and move on
nwp
nwp
12:03
I don't mean to say Haskell is bad. I just need to learn what the categories mean and why they are kept separate. When not seeing the issues when mixing them, unifying all the things looks reasonable.
"looks reasonable" is often tricky
BTW, you might want to take a look at alternative preludes @nwp. Since stuff like concat operator, numeric operators etc. are just functions, if you don't import prelude, you can change their meaning to your liking
@nwp I'll be honest here, but I don’t know of a concise way to sum up the 'what happens to HM in the face of more polymorphism' situation
of course you risk confusion when someone used to the default prelude reads your code, but I know that at least some alternatives are kinda widely used
there’s a couple of interesting lay explanations out there, but imo they still look at it from the angle of type theory [Quora, CS.SE‌​] that may not appeal to all programmers
@nwp my best stab at it: you may be able to conceive of a ++ with gives a ++ b the meaning you want, but by doing so you invite the question of how to make e.g. myOwnFold (++) xs work
Help me
Out of this hell
12:20
a what
12:35
is it safe to assume that if you find dynamic libraries named "libicui18n", "libicuuc", "libicudata" in one /bin folder, you may copy them together and they should work? more specifically, is library naming (i.e. boost) always accounts for this usage?
Ven
Ven
@BartekBanachewicz a haskell project using cabal
 
3 hours later…
15:26
@Mikhail 3D X Point = fail
At least that's what it looks like atm.
The higher write durability would make it suitable for storage, but not as a DRAM replacement.
 
1 hour later…
16:42
-2
Q: C++ : Try catch block infinite loop

Jcodesloop: count = 0; total = 0; value = 0; while(count != 10) //while loop to fix for only 10 values to be input { try { std::cin >> value; //cin to input value //Statement to check if input value is not a character if(std::cin.fail()) ...

goto inside catch T_T
17:14
@Mysticial how does it even look to the OS? Does it show up as RAM? Does the OS have some tiered write leveling?
@Mikhail I have no clue.
17:47
Lie to me
@Borgleader Flow control with exceptions :/
 
2 hours later…
19:31
@Mikhail Supposedly they're supposed to be a drop-in-replacement with normal DIMMs. IOW, the OS probably isn't going to know. And it'll need to be handled by the DIMM itself.
Since 3DXP is non-volatile, there is an non-optional encryption step added to the controller. So we're talking long latencies here.
 
2 hours later…
21:28
I have a dillema
should I tell a customer about a solution that would work to make the website faster but still keep a poor/useless usability
It just doesn't make sense to render 3813 categories that nobody will ever browse
I'd rather make the user click a couple of times than to have him find its way into the "windows" like submenu maze
21:43
@user703016 anet springs a neat surprise, I’m not sure if you played the original event though
22:09
@Mysticial about persistent RAM? the Os is going to need to know that it's there to make use of it though. otherwise it's just gonna assume it's all empty on power-on
@ratchetfreak If 3DXP becomes mainstream, that would probably be a few generations down the line.
And probably integrate into the hibernation features.
1000x the endurance as flash isn't good enough to be used as ram even with perfect wear leveling and no write amplification.
At least not for HPC workloads where you can easily sustain 100+ GB/s of memory bandwidth utilization.
going a few sticks of that for the kernel and the rest traditional dram sounds like a decent approach
the kernel isn't going to need to get swapped out all that much and the traditional dram is then for the userspace stuff
 
1 hour later…
@milleniumbug The conclusion I've been coming to about this "welcoming vs. "not welcoming" debate is that you must treat the new user OP like Trump. You must shower the OP with praise and only praise. Only say good things that make the OP feel good. Do not make any attempt to criticize or do anything productive because you will upset the OP thereby making yourself "not welcoming".

« first day (2831 days earlier)      last day (2339 days later) »