« first day (1805 days earlier)      last day (3146 days later) » 

8:02 AM
@Griwes use the single header release.
tools/bootstrap.py && ninja header if you want to generate it from trunk.
@elyse (> 5) <^(&&)^> (< 10)
 
user1804599
fucking Scala
 
posted on September 25, 2015 by Jim Springfield

...(read more)

 
user1804599
Set can't be covariant because it inherits from T => Boolean which is contravariant.
 
user1804599
@fredoverflow how's confx going?
 
user1804599
10:08 <          orbifx > hello all
10:08 <          orbitz > orbifx: get your own first 4 characters of your name.
 
user1804599
8:11 AM
lol
 
> We have an automated system called Gauntlet that consists of over 50 machines that builds all versions of the compiler and runs many tests across all flavors of 32bit, 64bit, and ARM architectures including cross compilers. All changes must pass Gauntlet before being checked in. We also regularly run a larger set of tests and use our compiler on “real world code” to build Visual Studio, Office, Windows, Chrome, and other applications.
p cool
 
user1804599
@BartekBanachewicz ApplicativeBuilders gonna build applicatives.
 
@elyse You can't tell that from the arguments?
 
user1804599
eh?
 
user1804599
there are no arguments
 
8:24 AM
Hi mates
 
hello
tgif
 
user1804599
> EU: "All refugees have to go to Schengen"
 
@R.MartinhoFernandes btw nonius is great. Thank you :)
 
Morning.
 
hi
 
8:32 AM
It's pretty calm today.
 
Yep
Car-free day on sunday here. Gonna be fun :p
 
@Mr.kbok Huh?
 
@Mr.kbok Are you in Paris?
 
shit ofc
@Morwenn yes.
 
Oh right, you scared me
I thought it was one of these pollution peaks again
 
8:35 AM
@Mr.kbok This might be fun :p
 
user1804599
Voiture sont dangereaux.
 
I live at daguerre so a tiny part of my neighborhood is car-banned :p
 
user1804599
@fredoverflow hence the room title
 
lol I didn't realize
 
user1804599
8:39 AM
@fredoverflow hahahaha I see the ad just now
 
user1804599
that's hilarious
 
@Mr.kbok Parigo!
 
@fredoverflow @AnastasiyaAsadullayeva was this you?
also, commiserations @fredoverflow on making owner
 
@thecoshman I found it on /r/programmerhumor
@thecoshman What? Simple English please.
 
@elyse I knew I should check before I click
@fredoverflow erm, sorry to hear you are now a room owner.
 
8:41 AM
@thecoshman Now? I have been a room owner for a very long time.
 
say what!
 
I'm always surprised when I try to improve an algorithm on a random guess without checking bounds and it actually works.
 
user1804599
> Saudi prince arrested at L.A. compound for alleged sex crime
 
user1804599
fail
 
Human Rights, etc...
 
user1804599
8:46 AM
lol, fail:
 
user1804599
> Syrian Teen Who Ate Poisonous Mushroom Dies in Germany
 
user1804599
> Last week, a hospital in Hannover reported it had seen more than 30 cases recently of mainly Syrian asylum seekers poisoned by eating the same mushroom.
 
user1804599
oh apparently they like collecting mushrooms
 
@elyse That's one big ass mushroom
They should put a sign on it
 
cpx
@fredoverflow Ah, this is the reason why I couldn't find the lounge yesterday.
 
user1804599
8:51 AM
 
> We also now track full source position information (including column) for all constructs. We aren’t currently using column information but we want to be able to provide better diagnostics in the future.
cl.exe is beginning to rival clang.
column info hype
 
MS waking up after 10 years of terribleness
oh shit guys I just realized everyone hates our browser
@AnastasiyaAsadullayeva what was your first message?
 
Off-by-one errors: « I'm pretty sure it will work if I add +1 ».
 
It doesn't ? Subtract 1
 
Same reasoning for integer division problems.
n / m is problematic? Well, let's just (n + 1) / m - 1 or (n - 1) / m + 1.
 
9:06 AM
Protos is so fun
 
#define plus + //FTFY
In which talk did Sutter mention scoped lifetime analysis?
 
but that wouldn't work right?
 
Meh, my great optimization only ranges from « sucks slightly less » to « sucks slightly more ».
 
Keep smacking it until it's fixed.
 
it happens :s
What are you working on @Morwenn?
Sorters still?
 
9:17 AM
The random margin-of-error changes are just a sign that a local optimum is around the corner.
 
@Mr.kbok I'm writing a proposal to make std::sort and std::stable_sort work with forward and bidirectional iterators.
From its complexity, it's clear that std::stable_sort describes a mergesort implemented using std::inplace_merge.
 
They require random-access right?
 
But std::inplace_merge doesn't work with forward iterators, so I'm trying to write a version which does.
@Mr.kbok Yes.
 
I'm lazy to look it up myself, but do the list sort members actually work by splicing and never swapping?
 
@Potatoswatter Yeah, they tend to do that.
 
9:21 AM
So sort(ls.begin(), ls.end()) would be different from ls.sort().
 
Xeo
the former doesn't even work
 
Not just in performance but in effect.
5 mins ago, by Morwenn
@Mr.kbok I'm writing a proposal to make std::sort and std::stable_sort work with forward and bidirectional iterators.
 
Xeo
ah, okay :D
 
@Potatoswatter I'm midway through writing a proposal for arbitrary template parameters.
 
@Potatoswatter It seems that there is no guarantee.
 
9:24 AM
It's absolutely not going to be accepted, but I always liked wasting my engergy
 
I guess you're fine if your implementation makes std::sort(std::list<T>::iterator, std::list<T>::iterator) call std::list<T>::sort. That way you have genericity without a performance loss.
 
@Columbo arbitrary?
 
65fe50b draw pointers as quadratic curves instead of lines
 
Looks cooler for sure
Can't you change the gui style though? The default style looks old IMO
 
@fredoverflow not sure it is easier to follow, make it configurable?
 
9:33 AM
@JohanLarsson It begins :D
 
the bloat?
 
yes.
I think he should decide.
 
but he asked/showed :)
 
@Mr.kbok Yes.
 
Wow, TIL std::forward_list had a before_begin member function.
 
9:34 AM
@Columbo I mean what do you mean
 
In C++ prog lang by bjarne , he says "Every name (identifier) in a C++ program has a type associated with it." , what is type of identifier foo in struct foo {};
 
@Mr.kbok Template parameters that can accept arguments of any kind.
> c++ prog lang by bjarne
You call him Bjarne, eh?
He's your mate?
 
@Columbo yeah :D
 
sorry, bad mood
 
@fredoverflow in this instance, yes, clearly better. The lines are still a bit hard to follow... so maybe some way of dynamically highlighting one at a time.
 
9:37 AM
cmon I didn't mean any disrespect to him by calling him bjarne
 
The 'hard to follow' I think it because you still have them converging towards a common point, and it's easy to loose track of which line you are following.
lose?
bah
 
someone please help me with that question
 
Shit, I'm hungry
 
@AngelusMortis if I understand the technicalities correctly, 'foo' is the type, but it is not an 'identifier'. foo bar; is an identifier called 'bar' of type 'foo'.
 
9:39 AM
@AngelusMortis Sorry, I don't know. I think by "name" he means "object", and that types don't qualify. But that's weird.
 
@thecoshman but foo is also identifier , a name in program
which gets in to symbol table
 
i.e. "name" refer to identifiers, not anything that can be arbitrarily named throughout a C++ program.
 
@AngelusMortis Actually, it doesn't.
 
@fredoverflow hay! no
 
9:41 AM
morning
 
@fredoverflow sorry man, was just a knee jerk.
 
@AngelusMortis I think it means something specific
 
@AngelusMortis OR, the other interpretation is that the type associated with foo is foo
 
Thank you both :)
 
@AngelusMortis If you find the answer post it back here :p
I mean the official answer I guess.
 
9:43 AM
@Potatoswatter I just checked the standard and it seems that an implementation could make std::sort call std::list<T>::sort when given list iterators without breaking any guarantee. The only problem I can think of is with a potential ADL swap not actually swapping the values, but I guess that many other standard algorithms would fail with such a function. The goal is not to be bug-compatible.
 
@thecoshman Or maybe give them randomly chosen colors?
 
@Mr.kbok hehe sure, I hope sir bjarne replies to that question :)
 
@AngelusMortis oh btw, that remark wasn't directed at you.
 
@Mr.kbok which remark oO
 
> The tag becomes a reserved word within the scope of the structure.
 
9:45 AM
@AngelusMortis forget it lol
 
@fredoverflow nah, I think for the most part it's ok. It's just when there is a mess of lines, it's nice to be able to have just a few highlighted. Say if you select one memory cell, the lines not to/from it fade away a bit, leaving just a few lines branching out, nice and clear.
 
I'm noob, you guys tease me :(
 
oh, and ofc, you'll want to make all those colours configurable at one stage
 
Xeo
@AngelusMortis You're welcome.
:P
 
@Xeo :)
 
9:46 AM
   io::stdin().read_line(&mut guess)
        .ok()
        .expect("Failed to read line");
why does read_line bother with taking a ref at all
 
@BartekBanachewicz It reuses the buffer?
 
@BartekBanachewicz what's this?
 
is that D?
 
@thecoshman So color the pointers by "hotness"?
@Mr.kbok &mut looks like Rust
 
@BartekBanachewicz to modify it?
 
9:47 AM
@fredoverflow may be yes
 
@AngelusMortis He means instead of returning a value.
 
@BartekBanachewicz oh, does it use that as an out param?
 
@thecoshman yes
@fredoverflow precisely
 
@BartekBanachewicz It reuses the buffer because that function is intended to be used inside a loop.
 
so I think kbok is right
 
9:48 AM
@Mr.kbok my bad, I'm gonna leave peacefully now :D
 
@Mr.kbok sounds like a premature optimization
 
@AngelusMortis lol, don't worry
 
eh eager evaluation is icky
w/e.
 
@BartekBanachewicz It's not premature, it gives you much better performance in most cases of reading text files. I think it's optimization after experience :D
@BartekBanachewicz C++ does that too, BTW.
 
@fredoverflow Would be nice to see what this cell is pointing to and is pointing at it, but not sure if having each level of indirection shown.
 
9:50 AM
@Mr.kbok it's just shitty that the language says "oh look our things are immutable" and then proceed to use out parameters anyway
I feel cheated now.
 
@BartekBanachewicz I thought rust had immutable-by-default, not immutable-because-the-language-actually-supports-it :D
 
@BartekBanachewicz well, it's explicitly not immutable is the key
 
@thecoshman if you have to use mutable types anyway there's no point in this
 
@Mr.kbok yes, immutable-by-default is the dea;
 
if the only thing you did is changing the default to less useful one then it's a shitty choice
 
9:52 AM
default-immutable is a bad idea in a fundamentally procedural language because in many cases it's suboptimal
 
either way, the tutorial shouldn't introduce performance optimizations
 
@BartekBanachewicz it makes it clear that this thing is mutable, thus you know you should rely on it's value. foo = "blah blah blah"; read_ln(&mut foo); print("foo did say : + foo); it's clear because of the &mut that this may not do as intended
 
@BartekBanachewicz you mean read_line?
 
@Mr.kbok yea
 
it's 'valid' code, but clearly not the right way to do what you want.
 
9:53 AM
@BartekBanachewicz There's no other interface I think
 
@Mr.kbok for reading lines? I think there is...
 
The last thing I want to know as a beginner learning a language are performance-related implementation details.
 
One more proof of how marginal the improvement is
@thecoshman not in stdin
 
match guess.cmp(&secret_number) {
wait what the fuck
are they comparing the random integer and the string now
> However, here, Rust doesn’t know how to compare the guess and the secret_number
phew
 
9:56 AM
do you mind coming back to mock it after you've read it all? :P
 
make one of those fractal articles
I'm getting RSI in the middle finger
too much scrolling
 
@thecoshman So you only want to display the state of the "currently mouse-hovered over" cell?
 
user1804599
hi
 
hi
 
9:59 AM
hi
 
hi
 
user1804599
@BartekBanachewicz what else?
 
user1804599
it could take by value and then return the argument
 
user1804599
but taking by ref guarantees that you don't get back a different one
 
@fredoverflow no quite. I want to show the state with say 'solid red lines', but the other 'pointer arrows' will be set to half transparent orange. With the normal colour being solid orange.
@fredoverflow if you don't follow me, I can do up a mock of what I mean for you.
 
Xeo
10:05 AM
@elyse I wonder if people still fall for that
checks transcript apparently they do
 
@thecoshman Yes please, because I don't get it...
 
@thecoshman okay, watching...
 
user1804599
@Xeo every week
 
user1804599
it's also a mental exercise for me
 
user1804599
10:14 AM
I have to think of new fake news headlines every week
 
@fredoverflow get it now?
 
@thecoshman Yes. If there are pointers in the selected array, are they selected as well?
Do you select by mouse or by code?
 
@fredoverflow probably not...
 
@Xeo It looks as if I am the only one this week
 
user1804599
class A { class A { class A { class A } } }
 
user1804599
10:15 AM
bluefag
 
@fredoverflow why not both? if you select a certain line of code (and maybe use a certain button/mode) highlight 'pointers' to match those that the line of code is referring to. If you click a cell in the GUI, highlight the code that deals with those
 
@thecoshman How soon do you need that feature? ;)
 
@fredoverflow lol
yesterday ofc
 
Because I have another C course starting in about 4 weeks, and I have more pressing features on the list, like %s in printf.
@elyse Have you started work on a visual COBOL IDE yet?
 
user1804599
No.
 
user1804599
10:21 AM
Vim works fine.
 
@fredoverflow well, I'd be happy to at least pretend to have the time to be able to look into it for you
 
That's okay, deadline tend to boost my productivity.
 
user1804599
@fredoverflow My new language uses S-expressions, and printf is converted into code by a preprocessor.
 
@elyse S-expressions = Lispy Parens?
 
user1804599
you can write custom preprocessors in Java/Scala/Kotlin
 
@elyse you can in/for any language
 
@elyse What does the pr stand for? ;)
 
I'm getting so tired of firefox leaking shit
 
user1804599
pression
 
it's like a habit for it to start running like shit as soon as it hits 1+ GB of usage
 
user1804599
10:25 AM
 
@AlexM. When that happens, I kill firefox from the terminal and then restart.
 
I can't restart now the music is still playing
 
@elyse Why do you mix Scala with Java?
 
user1804599
Because Scala 2.11 has no @interface annotation.
 
user1804599
Scala 2.12 will have it.
 
10:26 AM
Isn't trait without implementation implemented as an interface?
 
I wonder whether making my mergesort fallback to bubble sort for small lists will improve things.
 
Anyway, nothing wrong with it, just wondering.
 
user1804599
Yes, but @interface errors if it doesn't, similar to @tailrec.
 
@elyse what's that annotation for?
 
user1804599
@thecoshman It results in an error if the trait it annotates cannot be compiled into a Java interface.
 
10:27 AM
@AlexM. im tired of my motorbike leaking exhaust gases
 
@elyse oh...
 
now that's a freaking problem
 
SJD
Hello! Is somebody familiar with shadow mapping in openGL? (have quite few questions)

1) I manage to render shadows (spotlight type of light)
2) Shadows are rendered on floor but not also on other objects

The way I'm doing it is : I render the scene from the point of view of the light using a depth texture and then I use it when rendering the scene normally and sampling from it.
 
user1804599
@fredoverflow funfact: you can't call map on a Scala Seq in Java, even if you have an instance of CanBuildFrom.
 
user1804599
It won't type check.
 
10:30 AM
Yeah, I've heard of that.
Is it because Java's type system sucks?
 
user1804599
:D
 
user1804599
Java has no higher-kinded types.
 
user1804599
I think that's the reason.
 
that's why fuck Scala I guess
 
user1804599
Why fuck Scala because Java sucks?
 
10:31 AM
@BartekBanachewicz get electric bikes?
 
user1804599
Cutlet
 
@fredoverflow so you rather like it then?
 
@AlexM. that requires charging and is expensive as fck
@fredoverflow lol "in java wasteland"
 
@BartekBanachewicz it's an investment :P
 
10:32 AM
just don't use anything related to java problem solved
@thecoshman a losing one. Maintenace for an electric vehicle of that kind would be much more expensive
it's not like it's not done, of course
 
@thecoshman I haven't spotted any major flaws yet. It's a nice, simple alternative to Java.
 
but "investing' or "saving money" aren't even remotely related
 
user1804599
@fredoverflow does it have covariant mutable arrays?
 
@elyse no
 
user1804599
nice. :3
 
10:36 AM
Arrays and mutable lists are invariant. Immutable lists are covariant.
 
user1804599
Does it have path-dependent types and singleton types?
 
@fredoverflow that's a nicely done intro vid
he he he, enoom
Elvis operator ¬_¬
 
user1804599
10:52 AM
?:
 
user1804599
?:^)
 
user1804599
Should I target JVM or x86-64?
 
for what?
 
user1804599
concatenative language
 
why not both?
 
user1804599
10:54 AM
Because you have to design the language for either
 
making languages is terrible
 

« first day (1805 days earlier)      last day (3146 days later) »