« first day (1782 days earlier)      last day (3160 days later) » 

5:00 PM
^
 
@KendallFrey oooooh, right
 
...
 
well, that's an edge case that I really don't have to worry about I guess
for now
 
@towc That's because you're treating the camera as if it were at the edge of the view frustum, not the tip
 
It's not that uncommon
 
5:01 PM
you basically need to translate by your focal length or something
(or just use matrices)
 
@JanDvorak so the solution would be to use a par-voxel buffer sort?
or par-pixel, I don't really get the terminology...
 
Either use BSP, or a z-index
 
BSP?
!!google bsp
 
buffer sort pixel?
still, both would need to be done for every pixel
 
5:03 PM
binary space partitioning. You choose an order of triangles, and if a later triangle intersects a former triangle's plane, you cut the latter in half. Then you can sort them easily.
 
and we know how bad canvas is for par-pixel manipulations, unless I want to get into imagedata but meh
@JanDvorak oooh
 
@JanDvorak You'd need to cut it into at least 3 pieces
 
@JanDvorak wouldn't you cut both?
 
@KendallFrey a triangle and a quad will do
 
@towc imagedata is easy, it's how I do a lot of canvas stuff
 
5:04 PM
@towc it suffices to cut one of them
 
@JanDvorak a quad is two triangles
 
@JanDvorak oh, right
 
then you sort: if the camera is in front of the first triangle, then everything in front of the first triangle, then the first triangle, then everything behind the first triangle
then you get a tree of planes, each with some triangles inside
 
there are a number of good whitepapers about BSP from the Q3A days
it's super efficient to run, but fairly expensive to build
 
talking about reading and studying, I'll likely be fucking the dog all the time here XD
 
5:06 PM
@towc that's illegal
 
in the most advanced maths course they're still at logs
 
@towc Are you in Oxford at the moment?
 
@Callum yeah
 
used by Doom 3d. It's also why Doom 3d couldn't have moving walls, and doors were just sliding upwards
 
@towc Ah, on behalf of rUK, welcome to rUK! Enjoy your stay, and spend your monies here :3
 
5:07 PM
@Callum r?
 
@JanDvorak later version for Q3 support sliding sideways and the like.
 
rUK = rest of UK, as a nationalist and pro-indy Scotland campaigner, I'd say there's Scotland and rUK.
 
There might also be a paper around about how Volition did Red Faction's dynamic environment, which was (IIRC) BSP-based but supported limited regeneration of the partitions at runtime.
 
@ssube how? Did they just stick the movable surfaces to the leaves of the BSP tree?
or did they just move to z-buffering?
 
@Callum oh! Thanks! In what town are you?
 
5:09 PM
Does deploying your first Node.js application count as you kinda know a little Node.js?
 
@JanDvorak Movable surfaces aren't (really) supported by BSP, so they didn't act as actual partitions. The doorway was the partition, the door just moved over into the wall.
Not exactly sure how they calculated that.
 
@towc Small town called Lauder, technically 6 miles away, but close enough.
 
@Callum north or south scotland?
 
They certainly were able to do depth-checks by that point, so it could have used a depth bfufer.
 
C feels like BDSM to me (not that I have felt how BDSM feels).
 
5:10 PM
@AwalGarg BDSM is more fun and less restrictive than C.
 
@towc South of Scotland, sadly. I plan on moving north for Uni, though.
 
the posix API should be implemented in some higher level language. python maybe.
 
BDSM can be pretty restrictive
 
@JanDvorak that's the point
@AwalGarg you can invoke the POSIX API from essentially any language, since it uses __cdecl
 
@ssube More like BDSM actually allows you to choose if you're the S or the M and if you're the one getting tied up or not...
 
5:11 PM
@ssube not as nice. I want a direct interface like C, without C.
 
@AwalGarg you often can do that (C# certainly supports calling it directly)
however, you typically don't need to call the kernel from a high-level language
that's what standard libraries are for
 
how many decades until I can use C# on linux?
 
@AwalGarg -0.5
 
why would you want to?
 
@ssube just playing around with it, not really doing anything for prod
 
5:13 PM
@towc Here
 
@ssube that can't possibly be true
 
@AwalGarg right, but higher level languages exist mostly so you don't have to do those things manually
 
You can use C# without any OS at all
 
it's a design decision for them
 
yep, I get that :-)
 
5:14 PM
so using them, even as an experiment, starts to become an XY problem
 
@Callum sounds cool :D
 
@KendallFrey I have a netduino somewhere and it's sweet.
C# is such a nice language, using it for embedded stuff is pretty sane.
 
I do like some things in C. the file specific static variables, for one. pointer based references as well. But I feel the language has a too much restrictive type system (and, uh, somehow verbose cough function pointers cough)
 
Java was intended for embedded stuff
 
@AwalGarg How are function pointers too verbose?
 
5:16 PM
@towc Pretty cool, yeah. If you ever want a recommendation of where to visit in Scotland, I'm happy to give loads.
 
@ssube why do I need to tell it what parameters the function takes?
 
@Callum cool, thanks ;)
 
They could be slightly better, but typedef (*foo)(int); isn't that bad
 
@ssube not sure about verbose but the syntax is super-confusing
 
@AwalGarg so it knows when you call it later
@JanDvorak agreed
 
5:16 PM
@ssube what does that return?
 
until you figure out how they intended it to work
 
@ssube why does it need to know that?
 
@Cauterite not shit
@AwalGarg to type check
 
@ssube why does it need to do that?
 
@AwalGarg because you're writing a strongly-typed language
if you don't want type checks, go write PHP
 
5:17 PM
@ssube the function the pointer is pointing to has enough of type checking in the decalaration
@ssube and why am I doing that?
 
@AwalGarg those are lost when it's assigned to the pointer
 
@ssube Haskell has much better type syntax for functions
 
C has no type inference. C++ just recently added that, and I don't think they should have.
 
C isn't strongly typed, it's statically typed
 
if you're going to have a type system, explicit typing is pretty important as documentation.
 
5:19 PM
@ssube the function, as an entity in itself has type checking for the arguments, and I think that much is enough. There should be a generic function type so I can pass arbitrary callbacks.
 
@AwalGarg it does not
functions do no type checking, the compiler does
 
I find foo :: int -> int better than int *foo(int), and that's not even diving into modifiers
 
that's the difference between a strongly typed and statically typed language, as @Cauterite just pointed out
@JanDvorak lol
 
@ssube ahem Haskell
 
haskell's system is equally unreadable
 
5:20 PM
All I need is beauty and a low level weakly typed language.
 
the system TS uses (similar to C++11/14's) is my favorite so far
 
Haskell's system is rather simple: everything behind a :: defines the type, and -> denotes a function
 
@AwalGarg that's called assembly.
Become a real developer, write asm.
 
real developers use POKE
 
by mistake i went to C# room thinking its JS room and I was surprised how friendly people were there, I thought my days has changed until I realized it's C# room LOL
 
5:21 PM
Writing machine code is all cool and occasionally useful, but not that practical.
 
@ssube I said language, not wall to beat your head at.
 
@AwalGarg assembly is pretty simple, depending on your assembler
intel with nasm is relatively obvious
 
then add to that that functions of two arguments are curried = functions to functions -> the arrow is right-associative and you're done.
 
"low level" and "weakly typed" don't mix very well unfortuately,
that doesn't mean we can't do better than C
 
I want to remove &rb=1 from the url, why my code does not work ?
 
5:22 PM
@ssube You are technically correct, the worst kind of correct :-D
 
h = $('.l_voteup').attr('href');
h.replace("&rb=1", "");
 
@Sajad you're not writing it back anywhere
 
@AwalGarg depending on your instruction set i'd say
 
@Sajad are you ever gonna stop with that?
 
@Sajad because javascript strings are immutable
 
5:23 PM
I had a thought the other day - What if everything was a function?
Like the number 5 would be a function
 
@KendallFrey you'd theoretically have Haskell, but it wouldn't matter
 
@KendallFrey yo mama won't be JITable then
 
@KendallFrey what would calling the number do?
 
also you'd have all the overhead
 
@JanDvorak lol, idk
 
5:23 PM
not even in Haskell you can call a number
 
look, I add a argument to this like this:
h = $('.l_voteup').attr('href');
$('.l_voteup').attr('href', h + "&rb=1");
 
maybe 42 would be equivalent to 4(2)
 
Now I want to remove it, how ?
 
that sounds horrible
 
numbers would be constant identity functions, I guess
 
5:24 PM
@Sajad same way you modified it the first time
 
4() = 4, 4()()()()() = 4
 
Unless you make functions implement the Num typeclass (hint: don't)
 
@KendallFrey @AwalGarg having number functions that return the number makes a sick kind of sense
 
@AwalGarg sounds like church numerals
 
@ssube same way ? that way is just for add using +, not removing
 
5:25 PM
@ssube no, they return themselves
 
@ssube Except not, because a function that takes no arguments isn't a function
 
@Sajad you have the code to modify the string, you have the code to set the element's attribute, combine them
 
more like non-functions act like constant functions returning themselves
 
@KendallFrey sure it is
 
multiplying maybe makes more sense
 
5:25 PM
that's not super-useful
 
@ssube ahaa ,tnx :-)
 
6(7) == 42
 
any angularjs lover here or is it just me ?
 
@KendallFrey then what's 6("foo")
 
@ssube get out, infidel
 
5:25 PM
@JanDvorak typerror?
 
@KendallFrey that is utterly unintuitive
 
@Mathematics just you
 
@JanDvorak foofoofoofoofoofoo
 
@JanDvorak "6" foo times
 
@ssube 6 of 7 is 42? idk, crazy ideas
 
5:26 PM
@KendallFrey how about 6({foo:"bar"})?
 
how bout a language with no directly invokable types?
 
@ssube 6(a) would be 6 a's, not a 6's
 
you have to .method() every time
the only thing that is invokable is call
 
That's how Ruby lambdas work
 
@ssube oh, so basically Java++
 
5:27 PM
so you could 6.multiply(8) or "foo".repeat(3) but never foo(bar)
 
@JanDvorak error because that value doesn't have a "+" operation
 
shit, that is ruby
well, fuckit
 
except you also have the [] alias for call in Ruby
 
I've devolved to suggesting ruby, so I think I'm done with software
going to drive a trash truck, bai
 
the language I write will have the yeah keyword for everything truthy, and nope for everything falsy
 
5:28 PM
->{"foo"}["bar"] #=> "foo"
 
foo is String, yeah?
     die
 
used that way, yeah and nope mean the same thing
 
@AwalGarg yeah, nope.
 
@JanDvorak that's or, so nope
 
user1596138
Anybody use React-bootstrap?
 
5:30 PM
@JanDvorak someone in morning said they love TypeScript
 
@AwalGarg how is that or
 
any, what you use for databinding then ?
 
user1596138
Can I not find them or do they not have release notes.
 
user1596138
So many breaking changes, React errors on undefined components are cryptic.
 
What's typescript's function type syntax?
 
5:31 PM
@KendallFrey special-case language construct. yeah, nope
 
@AwalGarg example pls
 
@JanDvorak myObject.prototype.FunctionName() { // code here }
 
@AwalGarg that's not useful
 
@KendallFrey that is the example. the expression yeah, nope will be interpreted as yeah || nope
 
@AwalGarg but doesn't that just result in true?
 
5:32 PM
@AwalGarg why not [yeah, nope]?
 
@JanDvorak foo(arg:number):string
 
@KendallFrey yes, so return value is yeah
 
so :type after any declaration
 
4 mins ago, by Awal Garg
foo is String, yeah?
     die
so this is a useless condition?
 
so, you say the type of foo(arg) is string? No way to denote what the type of foo is?
 
5:33 PM
you can also do complex types, like foo(arg:{bar:number}):{bin:string} for a function that takes an object containing at least a bar field that is a number and returning an object that contains at least a string bin
@JanDvorak no, for functions it's the return type
 
@KendallFrey uhmm, s/,// can't edit now :/
 
let foo:string = "foo";
function bar(arg:type):returntype { ... }
 
How do you denote a function that takes a function? ajax(cb(r:any):void):void?
 
function types are () => returntype or (arg:type) => returntype, so you would just do function foo(functorBar: (bar:number) => string):string`
any declaration can have a :type annotation
the function type annotation is identical to the lambda declaration syntax
it's all fairly consistent and surprisingly elegant
 
so, can't you just do the same in top-level? foo : (arg:string) => string
 
5:36 PM
let foo: (arg:string) => string = (arg:string) => { return arg + "bar"; };
it's kind of redundant, but you can
 
@KendallFrey [WHITESPACE] yeah with no prepending , means and, and logical and returns a boolean, and ? creates a condition. ? will throw if something which is not a boolean is passed. (foo is String returns a boolean, sure, but maybe you just call a function there which returns a truthy value not a boolean)
 
Gotcha.
 
you can shorten that, too: let foo: (arg:string) => string = arg => arg + "bar"; since you've already declared all the types
 
PhantomJS is ghastly...
*badumtss*
 
foo :: String -> String
foo arg = arg ++ "Bar"
 
5:38 PM
the best part, IMO, is that the type system is contract-based. Anything you pass has to have at least the declared attributes/properties.
 
^ Haskell
 
@AwalGarg so foo is String yeah should just be foo is String?
 
Since JS is super object-based, you can ask for a functor with :{call: (scope:object, ...args: any[]) => any}
 
@KendallFrey in that particular case, yes. But I guess idiomatic code or something...
 
anything that is known to have a call method taking a scope and args can be passed, including real functions
 
5:39 PM
Interesting
 
It can make event type defs pretty clear.
 

« first day (1782 days earlier)      last day (3160 days later) »