« first day (1802 days earlier)      last day (3139 days later) » 

10:00 PM
Gotta ask in person
 
winrar is waste of money and space you'd be better off with 7 zip or windows 8.1
 
Too little time for questions
 
@AndyProwl wait for me :D
 
who here does mincraft?
 
About damn time. https://twitter.com/bitcrazed/status/646344728493977601
I had stopped hoping
 
10:03 PM
K, nothing changes
 
What is the question? And why isn't that in your question? Please open a new question when you realize you should have asked something else or now have a new question. This works. You have a live demosehe 8 secs ago
sigh
 
@sehe FIIIINAAALLLYYY
OMFG HEAVEN HAS DESCENDED
 
Of course that still sucks. But it's slightly less ridiculous now
Next, they might fix property editors in MSVC
(hint: nah)
Best use of 140 characters I've seen in a while
 
Holy shit I'm drunk
With half a bottle of beer
 
pussies
lemem teach you how to beer
 
10:12 PM
How did I do this
Fuck, I left my laptop charger in my room and there's two more talks I want to see
 
Noone with a charger around?
 
I won't be stealing chargers from people ;_;
 
@AlexM. I'm waiting
 
you could ask?
 
@Griwes You would not like to be in ISIS
 
10:14 PM
perhaps inpractical
 
@ʎǝɹɟɟɟǝſ waiting for what look at me I'm still sober even if beer
 
how do you do it
seriously this beer has much more alcohol than normal
 
hmm
if you wanna try a high alc beer try samichlaus beeradvocate.com/beer/profile/285/776
 
@ʎǝɹɟɟɟǝſ a.k.a. how much?
 
dunno
i would love to measure it though
 
10:17 PM
I like the taste but in a way it's like drinking fizzy cognac
 
Read the damn label, mate
 
Put a match to it and see if it lights up.
 
@AlexM. that's called wine
@набиячлевэлиь there are none
 
@набиячлевэлиь Almost as much as crappy wine? Well no, not likely.
 
ITT @ʎǝɹɟɟɟǝſ thinks he's drinking beer, is drinking lotsa самогон instead
 
10:18 PM
it's craft beer or however you call it in english
 
@ʎǝɹɟɟɟǝſ eh
 
it's very dark
 
speaking of wines
I gotta try sherries
I like vermouth a lot so I'm confident
you know an invariant of this codewars thing is that whatever solution I come up with in haskell that seems short to me
there's someone else who had sth shorter
 
because the number of characters is all that matters rite
 
nah or I dunno I only started writing haskell today
 
10:23 PM
> sth
 
@Puppy it kind of matter
oh I see
 
is this thing common and understandable @BartekBanachewicz
xbonacci :: Num a => [a] -> Int -> [a]
xbonacci as = (`take` xs)
  where xs = as ++ run sum as
        run f acc = f acc : run f (tail acc ++ [f acc])
 
You are gonna go with "short unreadable code is unreadable" vs "long readable code is readable" so length doesn't really matter
 
can you tell what this does
 
I meant that if you are able to express something just as clearly with less characters, especially if it's a lot of boilerplate you are skipping, then why not? It's better.
 
10:24 PM
mine is a lot longer and has the same result
3
xbonacci' :: Num a => [a] -> Int -> Int -> [a]
xbonacci' sequ baselen maxlen = if length sequ >= maxlen
                                then sequ
                                else xbonacci' (newelem : sequ) baselen maxlen
                                where newelem = sum $ take baselen sequ

xbonacci :: Num a => [a] -> Int -> [a]
xbonacci iniseq n
  | n < length iniseq = take n iniseq
  | otherwise = reverse $ xbonacci' (reverse iniseq) (length iniseq) n
 
Good boy writing down your function signatures
I'm proud
 
I don't know if the reverse thing was necessary but I had solutions be too slow before
 
Let type deduction to hipsters
 
@ʎǝɹɟɟɟǝſ Sure, but it's rarely just as clear with less characters, and raw character count is no measurement
 
and I know a : list is not O(n) like appending
 
10:26 PM
Eh, not quite true. With Haskell I've found myself often writing much much less code that was actually readable.
 
@ʎǝɹɟɟɟǝſ I'm trying to get comfy with it ok?
 
For example in 100 lines of code I wrote an equivalent (if not more powerful) program for which I wrote more than 700 in Java.
 
that's not even remotely comparable
 
@AlexM. I'm serious, don't omit top level type signatures
 
ok
 
10:27 PM
@Puppy How so?
 
well firstly, they're in two completely different languages instead of in the same language.
and secondly, equivalence/more powerful means jack shit about code clarity.
 
HO BOY. That pharma CEO everyone thinks is a smarmy shit is worse, WAY worse than we thought. http://gawker.com/lawsuit-scumbag-pharma-price-gouger-stalked-and-harass-1732357240
 
We are comparing languages
 
no.
 
I have real trouble believing the scale of this particular shit storm. Where's the catch? Why is it so one-sided? https://twitter.com/thedouglane/status/646428867633147904
 
10:27 PM
in his case both solutions were in Haskell.
 
Darn. Too late to delete the first ob
 
anyway my comparison was a bit meh
he was using more built-in stuff and I was reinventing
 
that's a perfectly valid comparison.
 
It's good
I'm very happy you are trying Haskell
How is it as of right now?
 
10:32 PM
yea but I dunno enough about the built in stuff to follow what his code does yet so
@ʎǝɹɟɟɟǝſ I like the pattern matching and list comprehensions
that's all I used a lot so far
 
take is the only thing you need to understand that code
 
I remember doing sth that used some tuples as inputs and had special cases for when either value was 0
being able to do
func (_, 0) =
func (0, _) =
was really nice
then I did
 
Haskell is very nice, but impractical at some level.
 
what level is that?
 
10:35 PM
The level when you start stacking more than 2 monads together
 
Erlang has cooler pattern matching
 
Also I don't personally like the "purity" of it all anymore.
I'd rather go with the C++ approach to "purity"
Which is to mark functions that are pure explicitly
 
same
 
I think that side effects sometimes are implementation detail, and Haskell leaks it everywhere always.
 
functional purity is just as bad as object-oriented purity.
 
10:37 PM
Well, except unsafePerformIO, but you will get stoned for that, so...
Also I'm not sure about the immutability of values.
I mean, it's a great concept, and it makes you feel good.
 
currently IME immutability is great for core interfaces, but not so useful for random everyday local variables
 
I don't know.
 
I dunno the thing looks cool to me
 
You still have mutability in the end
It's just in the form of returning the old value mutated
 
Weee.
 
10:40 PM
And let the garbage collector release the old one
 
In my C++ class again.
 
@AlexM. It is
 
@ʎǝɹɟɟɟǝſ Uh, no, if you do that then that's not immutable
 
Which is a good kind of mutability because parallelism and all
@CatPlusPlus You know what I mean
 
immutability is a tool, it has it's place and no more.
 
10:41 PM
> Cat Plus Plus uses pedantry
It's not very effective
 
Come on markdown, don't fail me on multilines
@CatPlusPlus Wait, I gotta fix that
 
This isn't pedantry
 
In Haskell you get "mutability" by, for example, taking some value as input and returning a new version with something modified from that inputted value.
And then you let the garbage collector collect the old value if it's not used anymore.
In the end you start with some value and you end up with a modified one.
 
Mutability has a very specific definition, and the storage really matters
 
10:44 PM
Mutability's dumb
 
Yes you can compute new values based on old values woo so fucking what
 
@CatPlusPlus Yes, that's why I'm not saying that values in Haskell are mutable. I'm saying that you achieve "mutability" in some other ways.
 
It has nothing to do with mutability
 
Why do you fucking need to swear all the time
 
ST is mutability
 
10:45 PM
Jesus
Whatever
 
porco dio
 
All the pros and cons of mutability follow directly from the storage reuse
 
I never claimed otherwise
 
You can't just ignore that and call any kind of new value construction "mutability" because it doesn't make any fucking sense
 
Are you serious right now?
 
10:47 PM
@CatPlusPlus The reality is that the compiler can detect it internally and reuse the storage anyway (at least it could in ML, and I doubt Haskell has lost that optimization).
 
Are you telling me that constructing a new value from and old value with some modifications to it has nothing to do with mutability?
And it makes no fucking sense
 
That's the goddamn cornerstone of immutability
 
it's mutable references/aliases that are the cornerstone of mutability.
if everything is semantically passed by value, then mutability vs immutability is non-observable.
 
Like in JS, where you can't tell if a string has copied its internals or not. ;~;
 
Eh, references don't have to mutable for passing by reference
 
10:51 PM
And this is not being pedantic?
 
this kind of pattern matching is cool too
reverseByCenter :: String -> String
reverseByCenter xs = left ++ mid ++ right
  where (right, mid, left) = splitWordAtCenter xs
 
No, you're right, let's just use any term for anything
 
I like that vs 3 separate defs
 
@CatPlusPlus Reference or value is non-observable if you're immutable
 
when the ret is a tuple
would be cool if C# had this
 
10:52 PM
@CatPlusPlus No, you just need to come towards those guys speaking to you. You know, maybe they didn't use the right term, but who cares? The concept is all that matters.
And you got the concept. Don't play dumb.
 
@AlexM. It might in 7
 
@AlexM. That's the most basic
Even Python has that IIRC
 
I don't python so
 
@ʎǝɹɟɟɟǝſ I'm really not sure if he did.
 
He is rightfolding
 
10:55 PM
my reverse logic should be the other way around
right + mid + left and left, mid, right at definition
I suck
I blame the beer
 
Can someone ping alex with that? I'm plonked.
 
user406009
@ʎǝɹɟɟɟǝſ Java is like the king of verboseness though.
 
user406009
Do a real comparison with Scala, Clojure, or Python.
 
user406009
Anyways, Haskell has all sorts of really annoying features.
 
user406009
Primarily laziness.
 
user406009
11:02 PM
And really bad namespacing.
 
oh hey someone who submitted a solution that was more verbose than mine
I'm basically a guru now
you can call me guru lambda
 
Can I ask an off-current-topic question about C?
 
user406009
@AlexM. I thought we were calling you Rapptz?
 
user406009
@Justin Feel free to ask. People will answer if they feel like it.
 
Okay. My electrical engineering TA mentioned that I should be careful about getting the address of a variable in C. I had a function with a signature similar to void doSomething(uint32_t arg1, uint32_t *dest), which writes to dest. I was calling the function similar to uint32_t value; doSomething(someValue, &value). But when should I worry about using & like so? I was under the impression the only time I have to worry is if I'm trying to return the address of a temporary.
 
user406009
11:09 PM
@Justin That's fine and legal. You are correct, the main issue is if you are taking the address of a temporary.
 
@Justin Don't take addresses of temporaries.
 
Yes, I understand not to take addresses of a temporary. My TA just thought that maybe I shouldn't pass the address to another function, where the value was still in scope. Okay, good to know.
 
@Justin If doSomething stores &value somewhere, you're screwed if it gets messed with again. Hencewhy it's usually discouraged. Usually.
 
@CatPlusPlus it's weird to see what gets argued in the lounge lately. Thanks for staying on point
 
user406009
@Justin The main thing is just to verify that your value is going to still be around when you are using that dest pointer.
 
11:11 PM
Okay
 
speaking of gurus, I haven't seen guru adrian in a long time
 
@ThePhD So I should avoid doing so?
 
his random talking about australia was fun to read
 
@Puppy nicely put, but perhaps it whooshed
 
@Lalaland When you say "the main issue", do you mean that there could be other issues?
 
user406009
11:12 PM
@Justin If doSomething stores that dest pointer somewhere else (like say in a global), you could possible have a use after free.
 
user406009
Imagine something like:
 
@AlexM. He went away on Christmas.
 
Aug 25 at 0:03, by sehe
Why would he care. He was god, after all?
 
@Nooble he probably got stuck in a chimney
 
Yeah.
 
user406009
11:13 PM
uint32_t *blah;
void doSomething(uint32_t arg1, uint32_t *dest) {
    printf("%d\n", *blah);
    blah = dest;
}
 
@sehe I really need to stop getting into crap like that
 
@Justin Read documentation, use your judgement.
 
@Lalaland Ahh, okay. That's definitely a bad idea. Thank you.
 
@CatPlusPlus Actually, you're keeping the lounge from disintegrating into a bunch of cinches there. But yeah. It's not a thankful role
 
If the documentation says its not using or storing it after the function is gone, you're A-Okay.
 
11:14 PM
Always reducing everything to the most fucking irrelevant implementation details and the arguing about high-level concepts
I really have no strength
I do have a pizza though
4
 
WOOT
 
cppreference/w/e
 
@CatPlusPlus I had pizza earlier today.
I wanna get more. >_>
 
don't steal his thunder
 
user406009
11:15 PM
@Justin Here is a good example of an api you need to be careful of en.cppreference.com/w/cpp/string/byte/strstr
 
user406009
Note how the return value of strstr actually refers to your input.
 
user406009
So if you do:
 
@sehe I'm not! I'm trying to relate. :c
 
@Lalaland careful? Just don't ever touch it!
@ThePhD ok!
There was so much relief in his pizza-admission
 
user406009
const char* foo() {
   char blah[1000] = "arstarst";
   return strstr(&blah[0], "arg");
}
 
user406009
11:17 PM
Your return value of foo is now pointing to an invalid temporary blah.
 
Pain in the arst.
 
Yes that can cause problems. I learned this early on when coding in C++
 
When did you go back to ownering this herd of cats sehe
 
@Lalaland why are you highlighting the most uesless corners?
 
Basically, I learned not to use C libraries
 
user406009
11:17 PM
@Justin You have similar issues in C++ as well.
 
@CatPlusPlus It was on a whim. I don't, actually, intend to go back to full-blown ownering
 
user406009
std::string::c_str() also has a reference to the owning std::string.
 
yesterday, by sehe
@elyse hahaha. Thanks anyways @Rapptz
context ^ righfold removed his ob gif in the nick of time
 
user406009
The important thing is understanding how the lifetime of the results correlate to the lifetimes of their parameters.
 
That's true
 
11:19 PM
@Lalaland I know. But I learned that C libraries never did what I really wanted them to do. I understand the similar problems in C++, for instance I once tried to store pointers in a vector, but the pointers were to temporaries. I don't do such things anymore.
 
user406009
@sehe He specifically asked for the corner cases "could there be other issues"
 
I thought maybe there was something really strange in C that C++ doesn't have. That appears to not be the case.
 
@Lalaland I agree with this more general approach. We don't go explain binder_1st etc. anymore either
 
user406009
No, in most cases C++ is a strict superset of C.
 
user406009
(VLAs are for suckers anyways)
 
11:21 PM
@Justin vlas, named memberwise initialization, implicit casts to whatever etc. etc.
C is just a lot less safe in all respects.
 
I dunno, I like named memberwise initialization.
That shit's cool, yo.
 
I probably would.
 
But C++ is not "safe by default". It's a low level language. You're responsible for using abstractions. And often: creating the right abstractions
 
Rust lifetimes maybe would help
 
They're talking about rust lifetimes at the current cppcon.
 
user406009
11:23 PM
@ʎǝɹɟɟɟǝſ Here's Potato's draft link: dropbox.com/s/6d2uvjb12jpxib9/values2.pdf?dl=0
 
user406009
It's basically a lifetime annotation proposal.
 
user406009
(With a couple of more stuff tacked on)
 
Note to self: take 3-4 of these 1-credit courses. They're easy.
Might as well get a whole class worth out of them.
 
user406009
My school has some of those as well.
 
user406009
The problem is that the credit from them is worthless.
 
11:30 PM
Hence why you take 3 or 4.
 
user406009
No, as in they don't provide credits to satisfy any graduation requirements other than elective credits.
 
Oh, right.
 
user406009
And you and I have already spent all of our elective credits.
 
user406009
On biology and chemistry courses.
 
Not quite.
I managed to get them to apply my Biology credits towards my technical core courses for years 1 and 2.
 
user406009
11:32 PM
Nice.
 
I've got like 20 credits worth of electives left to take! \o/
(Assuming I somehow find 4-credit electives: otherwise, it's 15 credits (five 3-credit courses))
 
user406009
See, you have enough room for formal logic!
 
:l
I don't think Philosophy is going to help me.
 
hey hey hey!
 
I should stop coming to this class altogether. It's not like there's a participation grade. .-.
 
11:38 PM
The last we talked, everyone said they were my friend, now, right?
 
This must be that deep-down love.
 
user406009
The Lounge is full of too many different people to have any consistent opinion on anything.
 
user406009
The only time the whole lounge gets together is when we try to forcibly evict people like Sino.
 
last time I checked TDM-GCC sucks
now I'm trying to explain it to someone else, but I totally forgot why it was bad
anyone remember?
or maybe it changed?
 
11:49 PM
Something about to_string
 
Ell
Man passive aggression is so unhelpful
 
Guys I think I have a super fever.
 
So, #letsencrypt.org removes scrutiny and barrier to entry from the trust provider field? Pro #httpseverywhere but crosstrust seems too much
Opinions /cc @CatPlusPlus (@Xeo?) - what am I missing?
@orlp last time I asked it was using the wrong exception model by default. Or something.
 
I can't find Tylenol.
 
It's domain validation, StartSSL's free cert is automatically validated too
 
user406009
11:53 PM
@Nooble Go outside and find a CVS. It's quite cheap over the counter.
 
@CatPlusPlus what part of it is about the trust, then?
 
Those certs only prove the ownership of the domain and not the identity of the owner
 
user406009
@sehe Only the lower end certificates are automatically provisioned.
 
I mean, will that not get the green bar thing?
 
Green bar is for EV
 
user406009
11:54 PM
@sehe You only get the green bar for the manually verified ones.
 
@CatPlusPlus Ah. That's what I was missing
 
Those are identity validated
And have shitload of requirements
 
Huh. That guy is taking his nots in Sublime Text.... with markdown?
No, no that's not markdown, but he does like to
=======================
Frame
=======================
stuff
 
user406009
 
user406009
@ThePhD Plain text is an awesome note format.
 
user406009
11:56 PM
Need a list? Just write 1. 2. 3.
 
en.wikipedia.org/wiki/… has the list of validation levels
 
@Lalaland Going outside not possible.
Too cold.
 
Thank you guys.
 
Org validation is used for ~serious business~ and Mozilla recommends it should be used for wildcard certs
But that's just basic identity confirmation iirc
EV has more requirements
 
Extended Validation certs cost an arm and a leg.
 
11:59 PM
Jun 17 at 21:44, by Rapptz
the static linking 'quirk'.
 

« first day (1802 days earlier)      last day (3139 days later) »