« first day (1868 days earlier)      last day (3082 days later) » 

11:00 AM
I want to do multiple passes anyway, so functions don't have to be defined in order
 
user1804599
You can just check whether the arguments to + have type int.
 
@Elyse yes you do
 
@Elyse Well, maybe you want to know the type of 'a'+1, I dunno :)
 
3 + 5.8 is f64 (64-bit IEEE 754)
 
user1804599
You need a function that takes an expression and returns the type of that expression.
 
user1804599
11:00 AM
If you have variables, this function also needs to take a map of (name, type) pairs.
 
@orlp A tree of scopes!
(Is it still a tree if you reverse all the links?)
 
@fredoverflow why wasn't that starred. I'd hate to have missed it
 
lol my symbol table is just a linked list of linked lists. Must be slow as hell with thousands of variables, but who cares?
 
user1804599
My symbol table is a map of names to types.
 
Programmers should be punished for having thousands of variables in scope!
 
user1804599
11:02 AM
module Env : sig
    type t
    val empty : t
    val add_value : Name.t -> typ -> t -> t
    val find_value : Name.t -> t -> typ
end = struct
    module Name_map = Map.Make (Name)
    type t = typ Name_map.t
    let empty = Name_map.empty
    let add_value = Name_map.add
    let find_value = Name_map.find
end
 
should a scope (or environment) have a pointer to it's parent?
 
user1804599
Redefinitions are checked earlier, so are not an issue here.
 
@orlp That's what I meant by tree of scopes.
Then you can just defer name lookups to outer scopes.
 
and globals are at the root!
hrm
then how do you handle this
 
exclamations are at the end!
 
11:03 AM
print(a) # oops
let a = 1
print(a)
 
user1804599
This is my symbol table data structure which also reports redefinitions: github.com/rightfold/confx/blob/master/src/name.ml#L57
 
@orlp not a problem in jabbascript
 
@orlp Well, if name scopes don't match your "compound statement scopes" or whatever you want to call those, you can't treat them the same.
 
jabbascript debelepores
 
11:05 AM
standards and poors
 
@orlp let a = 1 effectively introduces a new scope for names, since the names in scope before are not the same as those after.
 
@R.MartinhoFernandes I guess this is why early C requires declarations at the top
 
Your name scope type will probably need some flag that says whether it allows redefinition if you want to allow let a = 1; { let a = 2; } but disallow { let a = 1; let a = 2; }. Variable declarations introduce "soft scopes", braces introduce "hard scopes". Something like that.
@orlp Yep.
 
@R.MartinhoFernandes Wait, what? I always wondered about that and never quite understood. Can you explain? Why do all declarations have to come at the top?
 
@fredoverflow so {} corresponds to actual scopes
 
11:08 AM
int a = b;   // error
int b = a;   // okay
now what?
 
Is it appropriate to have something like "LibPrivateInclude.hpp" -- just to indicate that said header isn't meant for public use
 
@Prismatic detail/include.hpp
 
user1804599
@fredoverflow nothing special
 
or bits/include.hpp
 
@Elyse But has nothing to do with {}, read the comment above.
 
11:10 AM
@Prismatic I just put all that stuff in a detail/ subfolder, and the code entities in a ns::detail namespace.
@fredoverflow Hmm, you're right.
 
@fredoverflow now I've made a fool out of myself
 
@Prismatic IncludeMeAndAKittenDies.hpp
 
@Prismatic Eww
 
@fredoverflow i#include "IncludeMeAndAKittenDies.hpp<CR>"<Esc>10000.
 
CamelCase for headers
 
11:11 AM
MUHAHAHA
 
whats wrong with CamelCase for headers
 
It's not the norm
 
@Prismatic that it's not snake_case
 
See Boost and STL
 
making everything snake case is lame
 
11:12 AM
IMO CamelCase is reserved for types
 
I bet you are also that bad person that uses CamelCase for classes, right?
 
I use CamelCase for file names, types, enums and function names
all my variable names are snake case though
 
CamelCase for function names is a whole new level of cringe
 
Can you read your code? I can't. That's not a good sign. Never write code like that. The question "whether its the right approach" doesn't make sense. It's c++, not assembly. I'll read it now and try to decipher what it does. Next time, consider asking a new question.\ — sehe 2 hours ago
 
11:13 AM
I wish there a clip of Gary Oldman shouting "Everything".
 
That clingy OP. He didn't respond in two hours
 
@Jefery I use the CClassCustomer naming convention.
jk ;)
 
@R.MartinhoFernandes creepy
 
@Jefery I think its handy. Lets me easily tell what a function is and what it isnt
 
11:14 AM
@fredoverflow Good, I was about to go take a gun permit
 
@Jefery You won't like C# then.
 
I mean I agree that my IDE should be doing that with syntax highlighting but its still a handy fallback
ALSO
if the function starts with a little letter, its private
 
@fredoverflow If C# has a different naming convention I've got nothing against that
 
but if it starts with a capital its public :]
 
@Prismatic I disagree.
I'd say that it should be obvious.
 
11:15 AM
I'm all about sticking to the naming convention that makes most sense in the language you are writing
 
@R.MartinhoFernandes It's odd to think that he might never have even said it in a film
 
Stop doing shit naming.
 
And for C++, follow Boost
 
@R.MartinhoFernandes I'm not gifted with the boon of coming up with good names for stuff
 
Proper names > ANYTHING
 
11:15 AM
Its a disability you learn to live with it
 
35
Q: Alternate C syntax for function declaration use cases

acidzombie24So i dont know everything about C. What is useful about this C syntax? int func (p, p2) void *p; int p2; { return 0; } I was able to write this in visual studios 2010beta //yes the params are flipped void f() { void *v=0; func(5,v); } I dont understand. Whats the point ...

 
@Prismatic try harder
 
^ lol I still remember the WTF moment when I discovered those :)
 
@Prismatic what is a little letter? i or l? Or is h little enough?
 
@Jefery boost is ugly as hell
 
11:17 AM
if you were to design a programming language, what would your preferred naming convention be?
 
@Prismatic Who cares
It's the principle of least astonishment
You use a different convention than the one the standard library or boost uses? You are breaking that rule.
 
Oh come on now
How astonished can you possibly be just because you see some capital letters instead of underscores
 
> If you bought a Type-C cable or adapter from OnePlus, Pei said that you are eligible for a refund until the end of 2015.
lol
 
I don't go tell Haskellers to use snake_case because I think whateverTheNameForThisIs is ugly.
 
Tries to pass it off as not a problem, but offers refund.
 
11:18 AM
Are you gonna be going through the lib permanently shocked, eyes wide mouth open
 
@Prismatic When I'm writing code and using different libraries that use different conventions because "Ugh, it's ugly", it's quite astonishing.
I always have to remember which convention goes with what and how that translates to the code I'm trying to write.
 
Or you could just use whatever convention you like and stick with it
 
Nobody cares what you like.
 
;__;
 
We are not choosing the color of your shoes here.
 
11:20 AM
@Prismatic way to derail. The principle of least astonishment is obviously not about the emotion of astonishment (and to answer it: pretty damn astonished)
@Prismatic Do that. And be gone
 
I like how Haskell limits the number of different conventions in a useful way.
At least we don't have 4 different concurring conventions to follow.
 
On the topic of good names, TIL "USB 3.1 gen 1" is another name for "USB 3.0" and "USB 3.1 gen 2" is another name for "USB 3.1"
No typos.
WTF is wrong with hardware people.
 
Are any of the US folks gonna try and nab stuff for black friday today
 
More idiots.
How is eliminating the most recyclable ever material ever a goal?
 
Plasticway to hell
 
11:27 AM
> Ditching asphalt for plastic also makes sense if you consider what the more traditional building material does to the environment. Asphalt is to blame for 1.6 million tons of CO2 that stream into the atmosphere every year. That makes up 2% of all road transport emissions, according to The Guardian.
just citing the article
not saying I agree or disagree
 
When are we banning humans for their CO2 emissions?
 
@orlp Those are just numbers in a vacuum.
 
@R.MartinhoFernandes lol, that's so smart
 
@R.MartinhoFernandes it's not just numbers
it's 1.6 million tons!!!11
 
@R.MartinhoFernandes lol, still doesn't solve the problem of people not recycling their plastic. Also, asphalt is fucking good at being road
 
11:30 AM
Asphalt loves its job, it's a pleasure to watch him work
 
Asphalt is essentially garbage, it is nearly 100% recyclable (and large scale recycling of asphalt is a thing), and it is one of the best materials that have characteristics suitable for building roads (well, maybe you can ride bicycles on anything, but good luck with cars and trucks).
 
question: is any form of saving the environment effective when targetting the public?
 
Not sure what that means.
 
isn't in nearly every relevant category industry by far the biggest polluter?
 
@R.MartinhoFernandes no, concrete is better
as a German you should know that :P
 
11:31 AM
@BartekBanachewicz That's not contradictory.
 
oh wait it's "one of the best"
my bad
 
FWIW, concrete is also recyclable at nearly the same levels.
@BartekBanachewicz I was going for second best, but then concrete has some drawbacks, so the ordering is not strict.
 
Concrete is great for getting rid of wise guys, as well.
 
@BartekBanachewicz not really. Asphalt can drain water of the surface better, it also has some flex so will not break up as fast. It can have better grip too afaik, and maintain that better grip better.
 
hi lounge
 
11:33 AM
I think a big difference though is that concrete is not garbage.
 
@ArneMertz ho
 
@ElimGarak also counteracts the abstract
 
@thecoshman it deforms over time though
a good concrete road can last dozens of years but is more expensive to create I believe
 
11:34 AM
as for the grip, the more grip you have, the less fuel-efficient the road is
 
@BartekBanachewicz well, yes, it deforms, whilst concrete just breaks up. Both require good foundation work
 
@BartekBanachewicz Also more noisy.
 
@BartekBanachewicz Ice isn't very safe for driving on :P
 
@thecoshman the concrete isn't as susceptible to simply floating away in the sun
asphalt is literally liquid I think
 
11:36 AM
You want high friction, low adhesion. You want the tires to be able to transfer all that torque into forward momentum, without it trying to hold the wheels in place
@BartekBanachewicz well, tar is an amazingly thick liquid, but asphalt is not just tar
 
@BartekBanachewicz Isn't window glass also a (very slow-moving) liquid?
 
The pitch drop experiment is a long-term experiment that measures the flow of a piece of pitch over many years. Pitch is the name for any of a number of highly viscous liquids that appear solid, most commonly bitumen. At room temperature, tar pitch flows at a very low rate, taking several years to form a single drop. == University of Queensland experiment == The best known version of the experiment was started in 1927 by Professor Thomas Parnell of the University of Queensland in Brisbane, Australia, to demonstrate to students that some substances that appear to be solid are in fact very-high...
 
@BartekBanachewicz nor is asphalt... it just melts
 
@fredoverflow it is
 
@fredoverflow no
well, yes
but practically no
lead is more liquid than glass
 
11:37 AM
@BartekBanachewicz Pitch is not what is used on roads.
 
@R.MartinhoFernandes you use it on pigs against elephants :D
 
> taken in 1990, two years after the seventh drop and 10 years before the eighth drop fell
Jesus
 
Asphalt is an ambiguous term, but in the context of the article, it means "asphalt concrete".
 
Oh hey
Transmission is not closing
Who would have thought
 
@Jefery huh?
oh, torrent
 
11:38 AM
Well, at least those drops form faster than some C++ standards ;)
 
14 hours ago, by Jefery
Jesus Christ, Transmission, why can't you just close off and kill yourself.
 
> a sticky, black and highly viscous liquid or semi-solid form
well
 
I think you have something wrong @Jefery
 
> it is a substance classed as a pitch
 
@BartekBanachewicz Roads are 5% pitch, 95% what-is-essentially-"stuff".
 
11:39 AM
@thecoshman Oh yeah?
 
@R.MartinhoFernandes well
 
Tarmac != pitch
 
@Jefery programs are meant to close when you tell them to close
 
Tell me more
 
Oh, it's "blacktop" in the US.
 
11:40 AM
> it is used as the glue or binder mixed with aggregate particles to create asphalt concrete
 
@thecoshman Tell that to Android
 
fun fact! fun facts don't always have to be fun or fact
 
@R.MartinhoFernandes that's a colloquial term I think
 
@R.MartinhoFernandes pavement is more common
 
@Rapptz that's the foot path though, is that made of tarmac like the roads too?
 
11:43 AM
how do you detect/solve this as a compiler?
 
foot path is called sidewalk
 
auto g() { return f(); }
auto f() { return g(); }
assuming you do multiple passes to allow out-of-order declarations on functions at global scope
 
What do you want to solve?
 
@R.MartinhoFernandes "allow out-of-order declarations on functions at global scope" combined with "allow inferred return types"
 
> Traffic damage mostly results from trucks and buses.
> The damage a vehicle causes is proportional to the axle load raised to the fourth power
fuck you bus-riding road-damaging asshats ;)
 
11:45 AM
@Rapptz you call the road 'pavement'?
 
me? no
 
@orlp The order of declarations doesn't affect it. Anything not inferred at the end of the process is an error.
 
people? yes
 
@thecoshman The tarmac.
 
11:46 AM
> Slowly moving vehicles stress the road over a longer period of time, increasing ruts, cracking, and corrugations in the asphalt pavement.
@thecoshman wiki seems to
 
I call it asphalt
and I call the sidewalk a sidewalk or pavement
 
huh... could just be me, but 'pavement' is where people walk, not cars
 
@R.MartinhoFernandes but without doing anything special this will enter an infinite infer loop
 
we call it sidewalk
 
you have to break the loop somehow
 
11:47 AM
sidewalk is an American thing
A sidewalk (American English) – known as a footpath, footway or pavement in Australian, New Zealand, Irish English, and British English – is a path along the side of a road. A sidewalk may accommodate moderate changes in grade (height) and is normally separated from the vehicular section by a curb. There may also be a median strip, or road verge (a strip of vegetation, grass or bushes or trees or a combination of these, referred to as either a verge or a nature strip in Australia, and as an island in parts of the United States) either between the sidewalk and the roadway or between the sidewalk...
 
@Rapptz yes yes, we get that, you love you some sidewalks
 
@orlp Er, I guess the inferrence algorithm you intend to use sucks :P
 
@orlp you know you can check if the inferred function you're referring to was already attempted to being inferred and throw an error?
 
@Rapptz isn't that O(n^2)?
 
11:48 AM
how?
 
@BartekBanachewicz wiki does not call the road "pavement". It calls whatever the road is paved with "pavement"
 
@Rapptz because every step in the inferring has to check whether any of the previous steps is equal to it
 
Here's a chart:
US -> UK
pavement -> tarmac
sidewalk -> pavement
 
if you provide some ordering I guess you can bring that down to O(n log n)
 
"Pavement" should mean what you pave roads (or things in general) with, but Brits.
 
11:51 AM
@R.MartinhoFernandes probably they initially did not pave the roads but only the sidewalk :D
so the sidewalk was the only thing that had a pavement
 
@R.MartinhoFernandes terrible chart
 
makes sense to me
 
I prefer to use "tarmac" and "sidewalk".
 
@ArneMertz ooh
 
@R.MartinhoFernandes "road" and "path"
roads are for cars, paths are for people
 
11:54 AM
@thecoshman No, "tarmac" is not a road.
See also: sett
 
@R.MartinhoFernandes oh, I thought you were saying you use 'tarmac' as the general word for roads
 
A badger sett or set is a badger's den which usually consists of a network of tunnels and numerous entrances. The largest setts are spacious enough to accommodate 15 or more animals with up to 300 metres (980 ft) of tunnels and as many as 40 openings. Such elaborate setts with extensive tunneling take many years for badgers to complete. Setts are typically excavated in soil that is well drained and easy to dig, such as sand, and situated on sloping ground where there is some cover. Sett tunnels are usually between 0.5 to 2 metres (1.6 to 6.6 ft) beneath the ground, and they incorporate larg...
Thanks, wikipedia
 
@R.MartinhoFernandes TIL it's 'sett' not 'set'
 
user1804599
Sett Blatter
 
Ell
@Puppy good job I never got one :P
Guys I need help with my assignment :( In a hashtable, should I use one linked list per bucket or one long linked list?
 
user1804599
 
wait a sec
if I don't intend to infer function parameters, I don't need HM, right?
 
@Ell How would the latter work?
 
@Elyse lmao
but why
 
Ell
@R.MartinhoFernandes each bucket would point to a node in the long linked list
 
12:01 PM
And how do you tell the ends?
 
Ell
yeah I'm not sure of that :P
it would mean lookup would take a very long time
I guess which defeats the point of using a hashtable
Thanks :)
 
@Elyse Doesn't get more American than that
 
Ell
I needed a sanity check because my current hashtable_it doesn't work and I wanted a way out :P
 
anyway I'm going to use this 'slow moving vehicles' line from now on
road destroying snails
@Elyse was posted yesterday
 
is this unreadable? parents[*child++] = parent; (in a loop)
 
12:15 PM
That's perfectly readable code in my book.
 
@fredoverflow it's not the exact code :P I ad-hoc alpha reduced! :)
 
 
thats just dumb and not funny
 
xkcd or Haskell?
 
12:17 PM
send it back feeds
xkcd
 
I don't like avocado, and I don't know what relish is.
 
Maybe it's the thing that makes avocados good
 
skittles n ketchup
mmmmmmmmm
 
relish is that sweet green stuff they put on hot dogs some times
wiki says its any chopped up pickled vegetable
hmm
 
12:20 PM
@Prismatic relish is much more general
 
@ScarletAmaranth lol IRTA Elyse wide shut
 
@AndyProwl one would hope ^^
 
Ell
@Prismatic yeah relish is more general
 
@ElimGarak what's it talks aboot
@Feeds boo
 
@Mr.kbok Well, to get the gist of it, RimokatolikVEVO (the publishing whatever) means "Roman Catholic" and the name of the band translates to "Whip & Naked Women" :D
 
12:30 PM
but the song?
 
He's singing about corruption mostly, he takes the persona of an inbred hillbilly called Djuro who reaches the position of mayor and then abuses his position in hilarious ways. Why is it in Paris, I have no idea :D
 
what with paris and stuff.
 
good ol' C++11 constexpr.
I remember the fun times.
 
Say I want to do some OpenGL renderings on a headless system. What do?
 
12:35 PM
doesn't mesa do this?
 
Maybe. How do I acquire a context?
 
I have no idea. I know there are headless X servers, but I don't think it's necessary.
 
Ell
mesa can do this yes I think
 
Yeah, I'd like to avoid installing X stuff
 
@R.MartinhoFernandes you want osmesa I guess.
 
12:37 PM
Though actually this would be totally doable with a raytracer
Maybe I'll just pop out POVray
 
is this for work :p
 
@R.MartinhoFernandes What are you looking to render? If I may ask
 
Simple geometrical shapes.
 
Described by meshes? Splines? mathematical functions?
(i guess the last two can be considered the same, ish)
 
12:45 PM
Splines.
Is there a raytracing lib I can use?
 
when I do 3 + 1.5
and I do type checking/coercion
should I modify the AST from Plus(3, 1.5) to Plus(CoerceFloat(3), 1.5)?
 
sbi
@thecoshman If you're fine with staying in the same room with Björn (and supposing that he is), you are welcome here for the MC++ weekend. However, you lacking a conference ticket means you would have to do your own stuff on Saturday. You are, however, free to join us in the evening – wherever we end up with the conference crowd.
If you want, you could stay longer, too, but, again, you would have to be comfortable with staying in the same room with either a friend of mine (assuming she would be), or with me (if she wouldn't). However, just as @Andy, I have to work during the week afterwards, so, unless one of the others in town have time, you'd be on your own during the day.
 
@orlp interesting approach
Why don't you simply try and see how it pans out?
Neither of us is a professional compiler writer.
 
I have a designers block right now
 
12:53 PM
too many decisions to take at once and it overloads me =/
 
^ click on it and get the joke, I dare ya'
 
@orlp Thankfully there's ADL
 
@набиячлэвэлиь not available in my country :(
 
@Jefery argument-dependent lookup?
oh
 
@набиячлэвэлиь GEMA!
 
12:54 PM
overload
 
Xeo
@sbi Are there any plans yet?
 
heh =/
 
sbi
@набиячлэвэлиь "The uploader has not made this video available in your country."
 
ba-dum tss
 
I tried
 
12:55 PM
@Jefery that's stretching it
 
@sbi Get a better country
2
@fredoverflow sudo apt-get install poland
 
@sbi Thanks for the offer, but flights are silly expensive
 
@набиячлэвэлиь Why did you recommend different things for sbi and fred?
 
sbi
@Xeo Not that I know of. Björn and I suppose we'll spend the evenings wherever the rest of the crowd goes.
@набиячлэвэлиь Define "good".
@R.MartinhoFernandes "you"?
 
also, do I know this Bjorn? You use the name like I should do...
 
12:57 PM
@sbi In this context, it would be a country, in which you can watch Never Gonna Give You Up by Rick Astley
 
Bjorn Strästrüp
 
sbi
@thecoshman IIRC, @Tony once looked into taking the bus. That would take forever from Ireland, though, I suppose.
 
@sbi I think I'd make it in time to say hi and head home :\
 
sbi
@набиячлэвэлиь What the hell is supposed to be good about that?
 
@fredoverflow oh, I didn't think he'd be squatting too
 
12:58 PM
@sbi It's a good song
And you're eligible to be rickrolled, which is good
@R.MartinhoFernandes Because (a) I can't reply to multiple messages and (b) duping the message sucks
 
huh... €110... arrive Sat, leave Mon...
 

« first day (1868 days earlier)      last day (3082 days later) »