« first day (2028 days earlier)      last day (2921 days later) » 

user1804599
9:00 AM
Testing is difficult when your API isn't documented
 
Ven
WHY DIDN'T YOU TEST
 
user1804599
And what's a better way to document 90% of your APIs than to use types and discipline purity and parametricity?
 
Ven
not writing code to start with
(usually called "pulling a Cat")
 
user1804599
@Ven not allowed too much effort takes too long bla bla bla
 
user1804599
All sorts of excuses the morons I have the misfortune of working with made up
 
Ven
9:01 AM
just get a better job then :|
that fucking sucks..
 
user1804599
I have now. I work on a project now alone. And it's good. Tests, types, purity, few bugs, efficient
 
nwp
@Zoidberg yeah
 
Ven
and people hate you as much as you hate them :P
 
@Zoidberg Wait, your coworkers are actively discouraging tests? I couldn't imagine that kind of stupidity.
 
Ven
@fredoverflow because it's a "waste of time". since you're not churning out new features
 
user1804599
9:04 AM
@fredoverflow they have always worked without version control, using an FTP-upload-on-save on a production server dorectly
 
user1804599
What would you expect?
 
Ven
LOL
 
user1804599
Not even SFTP
 
user1804599
I was the one who introduced VCS.
 
Ven
9:05 AM
VCS prêt
 
@Zoidberg Which one?
 
user1804599
I was the one who introduced consistent formatting.
 
user1804599
@fredoverflow git
 
Ven
That "Haskell sucks" pdf is very interesting
@BartekBanachewicz dl.dropboxusercontent.com/u/40457956/haskell_sucks.pdf (dismiss the title)
 
@Ven agreed
 
user1804599
9:05 AM
Now I introduced types
 
Ven
I'm gonna work on some TypeScript project soon. first for school
 
user1804599
Next I'm going to reintroduce tests, separation of concerns, and DI
 
@Zoidberg How did these cavemen get anything done before you introduced them to fire?
 
Ven
and I might make people at work change from JS+Closure (with "type checking") to TS
 
user1804599
@Ven nice. Be sure to enable --noImplicitAny to keep sane
 
Ven
9:06 AM
sure. well I won't be working on that. I do C++
 
user1804599
And strictNulls if they have introduced that by then
 
user1804599
Also rewrite Functional Hack in TypeScript and discipline purity
 
Ven
well, get(a, b) { return a[b]; } is hard to type ;)
 
user1804599
Don't write untypeable code
 
Ven
not an option
 
user1804599
9:08 AM
Don't fall into the Perl pitfall of everything having to be as short and obscure as possible
 
user1804599
Write it as if it's C# without null
 
Ven
no, that's not it. say, we have a chart lib. we can't type the data.
 
@Zoidberg What is your favorite non-null-language?
 
user1804599
Sure you can
 
Ven
@fredoverflow refer to the bartek googledoc
 
user1804599
9:09 AM
@fredoverflow Hack has explicit nullability, does that count? Otherwise PureScript
 
Ven
@Zoidberg var config = {xAxis: 'date', data: [{date: ...}, ...]}; how to type this?
just consider "everything's a string"? :)
 
user1804599
Wrap the library and always use the same key for x and same key for y
 
user1804599
Then take a key function instead of string
 
Ven
oh yeah we're gonna tell clients they need to change the code everytime they have different charting stuff to do
:clap:
 
user1804599
9:12 AM
Make an opaque type Config and a function makeConfig<T>(data: T[], x: (t:T)=>number, y: (t:T)=>number)
 
Ven
number?
for the date? but it could be anything
 
user1804599
@Ven wtf? You don't have to change the code every time. You build an abstraction on it once
 
user1804599
@Ven then make it a type parameter
 
Ven
can't, because it's a string key
 
user1804599
You were talking about value not key
 
user1804599
9:15 AM
makeConfig transforms the input array so that the new array uses a string literal as the key.
 
Ven
I can't exactly transform an array with, say, ~1m elements anyways
 
user1804599
{xAxis: 'x', yAxis: 'y', data: data.map(r => ({x: x(r), y: r(r)}))}
 
user1804599
It ain't rocket science
 
Ven
you're still using string keys
you still don't know what's going to be the output type
 
user1804599
???????
 
user1804599
9:17 AM
Keys are always strings
 
Ven
yes, but you don't know the type of the value
or you might even typo the key
 
@fredoverflow That guy seems to be fixated on thinking that monads are for managing state and hiding side effects only, for some reason.
 
user1804599
What the fuck
 
user1804599
The type of the value is the return type of x/y
 
Ven
the key isn't known before runtime
 
user1804599
9:18 AM
You can't typo the key since the type checker checks the x and y arguments
 
Ven
and it very well might change during execution
 
user1804599
@Ven you didn't specify that
 
Ven
that's why they are passed as strings
otherwise they'd be literally useless
 
user1804599
But still, the x and y functions can read runtime values
 
Ven
I swear you're doing this on purpose
 
user1804599
9:19 AM
The keys are functions now, not strings. That's what makes this abstraction good
 
Ven
data.map(e => e[config.xAxis])
 
user1804599
Noooo
 
user1804599
3 mins ago, by Zoidberg
{xAxis: 'x', yAxis: 'y', data: data.map(r => ({x: x(r), y: r(r)}))}
 
user1804599
That's the impl of this:
 
user1804599
8 mins ago, by Zoidberg
Make an opaque type Config and a function makeConfig<T>(data: T[], x: (t:T)=>number, y: (t:T)=>number)
 
Ven
9:21 AM
this showcases exactly that you're doing it on purpose.
I give up discussing with you this time
 
Ven
and leave this:
2 mins ago, by Ven
and it very well might change during execution
 
this time again
types don't change during execution
 
Ven
@DmitriBudnikov ah tu es de retour ?
 
?????????
 
user1804599
9:21 AM
@Ven yeah so pass a different key function then
 
Ven
headbangs his desk
 
user1804599
How can you be incapable of understanding this simple abstraction
 
Ven
how can you be incapable of understanding that if I have {data: [{name: "a", rate: 3}, ...], xAxis: 'name'}
and someone changes it at runtime to be xAxis: 'rate', it has to update
 
user1804599
The library only uses xAxis and yAxis to read the objects in the data array
 
user1804599
So they might as well just be constant strings, if the data array always has that format
 
9:23 AM
is it a 2D array
 
Ven
it doesn't. that's the point
 
user1804599
The makeConfig function transforms the data array given to it to match that format
 
Ven
if the data always had the same format, this charting library would fucking suck.
13 mins ago, by Ven
oh yeah we're gonna tell clients they need to change the code everytime they have different charting stuff to do
 
user1804599
How would they?
 
Ven
they'd need to update the makeConfig/...
 
user1804599
9:24 AM
You just pass a different function to makeConfig when you have a different dataformat
 
user1804599
Whyyyy would they have to
 
user1804599
makeConfig is parameterised
 
user1804599
It takes the x and y value extraction functions as args
 
Ven
please read what I write instead of solving a problem that's far simpler than the one I have
"what's the type of the values I need to display" well duh I have no idea, it might change at some point, I can't type that statically
 
user1804599
The data format you pass to makeConfig is different from the one that it returns
 
Ven
9:27 AM
and to clear another thing up, it's read from JSON, so there's no "makeConfig" that can exist to start with.
@Zoidberg yes it better be
 
user1804599
You can't transform data you don't know the format of
 
user1804599
It's impossible
 
Ven
I know the format. At runtime. It might even change.
 
user1804599
Computers don't work that way
 
Ven
but hey please entertain me with more one-liner snippets that showcase a point unrelated to the discussion at hand
 
9:28 AM
@Zoidberg what if I throw some quantum bits inside
 
user1804599
makeConfig(data, r=>r[blah.x], r=>r[blah.poop]) still works
 
Ven
you have no clue what the type of r[blah.x] and r[blah.poop] are gonna be
 
user1804599
Use a union type of allowed types the chart library supports, or any if youre desperate
 
user1804599
brb shower
 
Ven
"use any" ("don't type it") is exactly:
21 mins ago, by Ven
no, that's not it. say, we have a chart lib. we can't type the data.
 
9:31 AM
You can. any is a type.
4
(gotta take the pedantry relay while rightfold showers)
 
Ven
mumbles something about good measures
 
what language is this about?
 
Ven
doesn't matter, really.
 
Partially back to chrome ... coz ads on firefox
 
Ven
@DmitriBudnikov "var a: any" means a is untyped
(or rather, unityped, if you wanna go all pedantic stuff)
 
9:35 AM
@BartekBanachewicz You gave C++ -80? Really?
 
@Ven No, it's typed as any. It says right there, even: var a: any.
 
Ven
I will, dad :(
 
This is basic type theory. How difficult is it to understand?
If you can't comprehend these extremely simple foundations I'm afraid you'll never be able to accomplish anything in life.
 
@Ven FFS and he doesnt mention TMCs
> Here'a hoist but a shitty one because i felt like showing you only part of the solution
 
Ven
@DmitriBudnikov I'm already doing good at accomplishing nothing, tbh
 
9:39 AM
If you write signatures with concrete transformers you're just bad at haskell
 
Ven
you know I'm bad, I'm bad, you know it
 
@doug65536 C++ is extremely annoying to work with
 
the sky is blue
any other platitudes?
 
Apparenty not so obv to some
 
9:55 AM
what I found surprising is that you gave +30 to Assembly
I mean, even C is better than Assembly
 
Assembly is often surprisingly fun to work with.
lol no
 
ew
stay away
go
 
:D
 
just go
 
Ven
I enjoy assembly, but just because I'm the one deciding what I do with it
 
user1804599
9:57 AM
COBOL ftw
 
if you are being sensible, you don't end up with that much assembly, so it is fine to work with
 
Ven
cobol's pretty nice :)
 
reversing a string in assembly must be awesome fun yeah. Not that in C it's much better now that I think of it. Still
 
Ven
really isn't that bad
 
I would call a whole function of SSE intrinsics to be "assembly". same thing except it does register allocation for you
 
9:58 AM
rep <3
 
@AndyProwl there should be a strnrvrse_s function
 
Ven
@Griwes onto the 10k? :P
 
no, no
I mean the prefix :D
 
user1804599
@AndyProwl depending on its encoding it may be trivial
 
Ven
hahaha okay :D
@AndyProwl it's fine if you already have a strlen and a strdup, I guess ;)
 
9:59 AM
rep movsq best rep
 
user1804599
@Ven do it in-place; more versatile
 
rep kickgrws
 
:D
 
Ven
@Zoidberg your users might hate you for it, tho :)
 
rep cmpsb is pretty cool too
 
10:00 AM
repnz scasb
 
or was that repe
 
I like CMPXCHG16B... suddenly 10 letters long lol
or almost every sse instruction, when the "e" of "mov" is omitted
 
The really fun thing with that cmpxchg16 is that's it is pretty much required for x86_64 atomic shared_ptr.
 
Ven
learns about rep
 
...and some microarchs actually don't have that :X
 
10:03 AM
yeah, 2x-pointer-sized cas is really good to have
 
user1804599
I'm going to write a web app in PureScript for displaying, editing, and transforming lambda calculus terms.
 
@Ven You didn't know about rep before? :D
 
user1804599
To get a better understanding of stuff like Church encoding.
 
Ven
@Griwes no, I know very very little assembly
 
user1804599
How do you encode a fork bomb in lambda calculus?
Mosque encoding.
 
10:10 AM
I miss the days when -O0 generated total crap code that loaded and stored everything separately on every line. I'm so tired of the debugger jumping all over the place in debug build
believe me, I've tried
 
@doug65536 lol
 
lol
 
@Ven Why? You didn't say anything horrible or anything :p
 
Ven
@Morwenn "hurts" wasn't very nice. I much prefer to hug.
 
Make that a typo.
 
10:23 AM
perl 100? wow... that's an outlier :)
 
stable_adapter<hug_sorter>
 
I'm an old perl fart that gave up at perl 5
I went from expert to clueless in one version
 
Ven
Perl 5 came out same year as me.
 
@doug65536 If you follow the development of a programming language, you know how to use it properly before it's officially out.
 
Ven
different times
 
10:26 AM
an analogy might be C++ dropping all the C compatibility stuff and getting rid of pointers
 
Wait what, Perl 5 came out in '94? That's... earlier than I thought.
 
Ven
@Griwes yeah. I was born around a month later :P
 
c++ getting rid of pointers?
 
Ven
indeed
 
> Des copies de la plupart des personnages count de la chaîne d'octets pointée par src (y compris le caractère nul final) au tableau de caractères pointée par dest. Si count est atteint avant la src chaîne entière a été copié, le tableau de caractères en résulte n'est pas terminée par NULL.
> Si les cordes se chevauchent, le comportement est indéfini.
/cc @LucDanton
 
10:31 AM
Qualité traduction.
 
> no module named 'ninja_syntax'
WTF, it's in the same folder.
 
That's because there are no modules in C++, duh.
 
It's Python.
OH FFS
 
I remember one time when Python wasn't able to find a local module because of an access rights problem.
 
It works with Py2
FUCK THIS SHIT
 
10:36 AM
Morning
 
Made the mistake of running a vendor lib through asan
> ==33399==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x61400000ee40
:china:
nihao vs nihao[]
 
Now I have to use from . import X :<
 
@DmitriBudnikov Noob.
 
@Morwenn Tell that to the debelobers
 
Here I go adding special casing bullshit again to make this be a Py2/3 polyglot.
 
10:37 AM
@DmitriBudnikov I wish I could :(
 
I can't because they don't speak english anyway
 
@R.MartinhoFernandes Why make a polyglot while you could simply say « fuck » to Python 2? :(
 
@Griwes that /cc @Andy
I don't make serious stuff in assembly
 
...as long as you remember to put comments into there.
 
ass embly
 
10:41 AM
I once had like 8 lines of assembly that I didn't comment at all; after not looking at it for a month or so, it took me like 30 minutes to figure out what the heck they did.
 
That's an average of 3.75 minutes per line!
 
@Morwenn Because you can't.
 
Sure you can, but not without consequences.
 
@Griwes that's not so bad anyway
Our asm exam at uni was the most hilarious though
 
Oh, the relative import syntax was backported already.
Guess this will do.
 
Ven
10:45 AM
@Morwenn I'm currently facing the "Erlang can't find a module for no specific reason" problem.
 
Ven
buttembly
 
@Ven At least here aren't many surprises with #include. It's pretty straightforward.
 
Ven
@Morwenn it's a black box, I have no idea what gets loaded where
 
Convenient...
 
10:48 AM
@Morwenn until you have templates with dependencies and you have to start pulling definitions out and leaving declarations, trying to figure out what order it needs or what forward declarations to do
 
Ven
I might even be calling it incorrectly, since foo:bar(1) gives an error, but foo:bar(1, 2) might not.
 
@doug65536 Just forward declare the world first, and you're done.
@Ven And that gives you a module error?
 
Oh ffs, now there's different behaviour between 2.7.10 and 2.7.11 :<
 
ever seen what a template function in a template class looks like outside the declaration? it ain't pretty
 
DON'T BREAK SHIT IN REVISION BUMPS
 
Ven
10:50 AM
@Morwenn no, that's not how it works in erlang. it's smalltalk-ish in that it just... "undefined function jiffy:encode/1". I could be typoing the module, the function, or have the wrong arity.I'd get the same error
 
No wait, that's my fault.
 
@R.MartinhoFernandes Well, that's the whole « there won't be anything after 2.7, so let's put everything in it », right?
 
Forgot to update submodules.
 
Ven
OMG are you joking? this lib doesn't support rebar3?
 
I remember having had a problem because an old 2.7 pickle.dump didn't handle unicode, or str and unicode didn't coerce the same way as a newer 2.7. I don't remember actually.
 
So?
 
Ven
ew.
 
so declaring and defining interdependent templates is a nightmare. you end up lifting definition out of declaration and end up with stuff like that
 
Ven
so my project is stall for now because of bugs in the build system and a maintainer that doesn't want to update stuff
why is the universe forcing me to rightfold
 
@doug65536 just define it inline, man
 
nwp
10:57 AM
anyone understand that one?
user image
8
 
@Ven Write your own build system!
(Then you'd become Griwes.)
 
Ven
@Griwes I'd become Griwes if I wrote my own operating system to run my own build system to build my code :P
 
@Ven heh
 

« first day (2028 days earlier)      last day (2921 days later) »