« first day (2029 days earlier)      last day (2909 days later) » 

1:00 PM
@Charlie All you need for space mining is an eve online account
 
we are going to colonize a piece of rock in the space, how lovely!
 
And leave water bears to populate it.
 
We already have space travel just go to the questions tagged to peek into another dimension
 
oh my, that help vampire though
 
javascript if in solar system
 
1:02 PM
from 200 objects, to now 15k
and thats not counting the bullets
 
amazing
 
that must be like 100k triangles
my GeForce 3 would prolly get really hot :P (no really good effort there I suppose)
 
the bullets are 2 triangles only, while the dots are 50 i think?
 
is it instanced?
 
I hope so lol
 
1:07 PM
instanced? im not sure what you mean
 
heh @Borgleader
 
I always want to work on graphics stuff at home but 2x 2h commute just takes all the energy out of me
 
@Charlie google "instanced rendering" then
 
so it probably isn't then :D
 
like i have an array of struc debris
 
1:08 PM
@Borgleader aw, sucks
 
i only update the matrix for rendering
 
@Charlie that's slow
 
ill show u the drawcall, 1 sec
 
i know how it looks like
you don't need to show it to me
what you want to do is pack all those matrices (or even better vectors) into a VBO and run glDrawArraysInstanced
I suppose the "struct of arrays" data model kinda shines here, altough I still wouldn't recommend it for 15k entities because pff we have 15GB/s data lines nowadays
 
hm, Its faster when using indices
 
1:11 PM
then glDrawElementsInstanced?
 
im using glDrawElementsBaseVertex
using indices makes it faster
 
@Charlie so how about this nicely named function called glDrawElementsInstancedBaseVertexBaseInstance
don't we all just love OpenGL
 
lol
 
(I am not kidding)
 
the bottlenec is actually computing the matrix per draw call
 
1:12 PM
so push it to GPU?
 
calculating the matrix?
 
yes
Also you're doing a drawcall for each element, right
 
you dont want to do that per triangle tho
like im drawing the debris model, with debris texture
 
@Charlie and you do one drawcall for each instance?
 
over and over, only changing the model matrix per draw
im doing everything inside a single object, it has like a vector of struc debris
if thats what you mean
 
1:16 PM
@Charlie and how many times do you call glDrawElements when drawing that debris? Once per one debris?
 
once per debris yeah
 
@Charlie and there's your problem
 
im not sure how to go about it otherwise
or what do you mean?
like the bottleneck atm is updating the matrix per object
If I knew more about matrix calculations, im sure I could pass something cheaper tho
like precomputing every part but the rotation and location, so I could have most of it done prior to passing
 
13 mins ago, by Bartek Banachewicz
@Charlie google "instanced rendering" then
@Charlie just multiply the projection and view matrices together, send that as a uniform, and pass the model matrix as instance parameter
 
yes, I do think this is what im doing
 
1:22 PM
@Charlie no, it's not.
I specifically mean instanced rendering capabilities of OpenGL for which you need glDrawElementsInstancedBaseVertex for
 
im using opengl4.0 hm, let me read up on this
 
@Charlie ah, hm. No way for you to upgrade?
 
I could, but Ive learned in the past that you want to avoid making it the newest version
 
@Charlie oh wait, it's just baseInstance version that got core in 4.2, basic instanced rendering requires just 3.2
 
is the performance gain big?
 
1:24 PM
@Charlie yes
 
borgleader, i think?
 
@Charlie this will be too advanced for you now
try to convert your code to use instanced rendering first in general
 
hm, ill look at that, thanks
 
TLDR you just put your per-model data into a VBO and let opengl iterate over that
 
I thought thats what im doing already
like i bind the vbos and just draw for each matrix
 
1:27 PM
@Charlie no. You're the one looping over your elements and calling draws.
 
hm, yeah?
 
@Charlie yes, and the point is to get the matrices together and draw once for the whole bunch of them
 
ah, you can do that?
 
:)
that's what I've been trying to say for the past 15 minutes
I'm a bad OpenGL tutor
 
so how do you pass the matrixes to gpu
without using them per vertice
 
1:28 PM
19 mins ago, by Bartek Banachewicz
what you want to do is pack all those matrices (or even better vectors) into a VBO and run glDrawArraysInstanced
there's a command called glVertexAttribDivisor which you use to tell OpenGL how the instance data is going to be used
 
glDrawElementsInstancedBaseVertex this is the call?
 
ill study it then
 
glVertexAttribDivisor(WVP_LOCATION + i, 1);
@Charlie afaik this is the thing that makes attributes per instance
 
1:30 PM
nice, you agree even
 
lol.
yes, we agree, because this is stuff that you can find in a lot of tutorials and most importantly in the spec itself
and the command is made specifically for scenarios like yours
 
figures, ive been thinking there has to be a better way
 
eh I should probably benchmark Hate at some point
so far the only perf assessment I have is "slow as fuck but usable"
 
=)
 
> Always be yourself.
Unless you can be MAN IN BUSINESS SUIT LEVITATING.
Then be MAN IN BUSINESS SUIT LEVITATING.
 
1:40 PM
ah cool my simulation actually works
who needs graphics when you can print your whole state each frame
 
How can I "std::cout << " on a specific terminal line with an offset?
 
OS-specific, std::cout can't do that
 
such that it replaces only the minimal locations necessary.
POSIX
 
@USERID_UNK dunno, printf("\33[%d;%dH%s", y, x, str)?
so std::cout << "\33[" << y << ';' << x << 'H' << str;
 
user1804599
inb4 printf rage
 
1:46 PM
Neat! Thanks
why the printf rage
 
hey @Zoidberg, how to simplify (\d -> position %= applyMovement d) =<< use direction
 
also, "\33[%d;%dH%s" <<<<<< what is all that
 
Ven
@BartekBanachewicz it's not very complex
 
user1804599
use direction >>= (position %=) . applyMovement
 
POSIX control string that moves the caret to that location
 
user1804599
1:47 PM
rightfold.gitbooks.io/fh/content/subset.html does anyone else also see the period after the 1 in the footnote?
 
user1804599
It bugs me.
 
@Zoidberg hmm
 
Ven
wtf are these stars??
 
user1804599
1:50 PM
:'(
 
Ven
i do as well .
 
Do I have to "reset" the cursor?
 
Ven
@Zoidberg implement user-defined operators for FH :)
 
user1804599
As a PHP extension?
 
user1804599
Also it's not very useful in general; many things require semigroups, rings, or eqs, and you don't have implicits in PHP.
 
Ven
1:54 PM
just think about being able to write $foo >>= $bar
 
user1804599
Ah.
 
user1804599
What would be the type of >>=?
 
user1804599
No HKT.
 
Ven
:'(( fuck hack
 
@BartekBanachewicz Do I have to "reset" the cursor? (just realised I could mark it as a reply)
 
user1804599
 
user1804599
 
@USERID_UNK depends on what you want to do
 
Ven
wait why do you still have the perl script
 
if I want to then continue as normal
 
user1804599
Why would I delete it?
 
Ven
1:57 PM
implement it inside of FH directly
 
user1804599
That's not part of FH; it's a separate project: github.com/rightfold/rose
 
user1804599
FH is a library.
 
Ven
ah, ok
well, implement custom operators for rose instead :P
 
user1804599
could do, but issues with scoping etc
 
Ven
always lexical vOv
 
user1804599
1:59 PM
but you can already do cool stuff like this:
 
user1804599
fn awkward[TR](onError: fn(TError) => TR, onOk: fn(TOk) => TR): TR is
    if this->isOk
    then onOk(unchecked(this->value))
    else onError(unchecked(this->value));
 
user1804599
@Ven what about multiple files?
 
Ven
¿
 
@BartekBanachewicz ok, is there a way to get the current location? then I could just place it back afterward
 
user1804599
@Ven I have a better idea, I'll make it a lisp.
 
2:00 PM
@USERID_UNK add \338 at the end
 
user1804599
And you can write plugins to create any sort of macro you want
 
Ven
@Zoidberg good. that sounds amazing
a good statically typed lisp for the web and some other stuff.
 
user1804599
Macros also allow for generic monad ops like sequence XD
 
return $
    if dx == 0 then
        if dy == 0 then DirN -- on target, essentially impossible
            else if dy > 0 then DirS
                           else DirN
    else if dx > 0 then
        if dy == 0 then DirE
            else if dy > 0 then DirSE
                           else DirNE
    else if dy == 0 then DirW
            else if dy > 0 then DirSW
                           else DirNW
 
user1804599
hack hack hack
 
2:02 PM
clean code #101
@Zoidberg yes that's exactly what that is
 
Ven
lol.
 
user1804599
@Ven I'd write it in Hack though, not Haskell, because plugins
 
Ven
if a
  else b
get haskell'd
@Zoidberg so you're not gonna do that for now? :)
 
user1804599
yeah
 
@Ven one of the problems in Haskell is that I don't fear writing such cryptic things because I know I can't make a mistake
if I write bullshit there it won't compile
 
user1804599
 
so however cryptic it is, it'll work
this is kinda scary
 
Ven
@BartekBanachewicz i'm just laughing at haskell's off-side rule
@Zoidberg when do you start? :P
 
user1804599
Now?
 
GameState {_units = fromList [(UnitId 1,Unit {_UnitState = Moving (PositionTarget (Position 10 10)), _attackCooldown = 0.0, _movementCooldown = 0.34999987, _UnitType = UnitType 1, _position = Position 4 (-3), _direction = DirSE})], _lastUnitId = UnitId 1, _tick = 100, _players = fromList []}
hmmm I think it's reversed
not sure why, I wanted S+, E+ system
toMovement DirS = Position 0 1
toMovement DirSE = Position 1 (-1)
oh lmao
tyeps don't protect against idiocy
 
this is brand new information
Also who let Bartek take over the starboard
 
2:09 PM
@DmitriBudnikov 6 last starred messages are mine so pff noob
@DmitriBudnikov lol
 
THIS ISN'T A POPULARITY CONTEST
or is it
 
keep telling yourself that
 
Ven
some guy randomly starred a lot of shit
 
@BartekBanachewicz The strongest force in the universe is love Nope that's idiocy
 
> why registers have the highest bandwidth? Because of all threads can access them parallel?
8
 
Ven
2:11 PM
hence why bartek is so present :P
 
I wanted to take a bite of chocolate mousse when I saw some half-dead mosquito barely moving in it.
 
Ven
@Morwenn noooo :'((
 
@Morwenn be optimistic, it also means it was half-alive!
 
@Ven I guess it has to do with the fact that I didn't eat all the mousse I brought with me yesterday, so the mosquito had ~3h to take a lethal dive in it.
 
Ven
that's so sad
so hard to hear
 
2:13 PM
Well, half of the mousse was still in the fridge and should be ok, but for some reason I don't want it anymore.
 
I have to say that developing the game logic using just console is pretty lol
on one hand i can't wait till i see all that in motion
on the other I don't have any real need to hurry that up
 
Noooo, the big oceanography boat won't be named Boaty McBoatface :(
 
@BartekBanachewicz Thanks!
 
hmfph I've also realized i need a way for a unit to occupy two fields at once
 
They still kept the name though... and gave it to a submarine.
 
2:15 PM
because in the transition period that's essentially what happens
but it should work right now in general so
 
On the other hand, Subby McSubface sounds like something out of a BDSM film with beardy Irish guys.
 
eh almost like potato empires
 
Ven
@Zoidberg wait, what does ${@a} do?
 
user1804599
In what language?
 
user1804599
Perl? Return the array length.
 
user1804599
2:21 PM
I think.
 
Ven
no
that'd be scalar
 
user1804599
Ok.
 
user1804599
Then it dereferences the length of the array as if it were a reference to a scalar.
 
Ven
oh. hahahaha
indeed :D. thanks
 
user1804599
brb dinner
 
2:27 PM
Dinner? But it's barely 4:30pm .____.
 
Ven
rightfold does that often on days she doesn't work (i.e. weekends).
 
Fun. On Friday/Saturday, I'm more likely to eat dinner around 10~11pm.
 
Ven
I'm more likely not to eat, because I'm gonna be too lazy to.
 
Yeah, that too.
After my aborted attempt to eat chocolate, I ate a doughnut and a small slice of bread.
But that's pretty much it for today. Not sure what I will eat in a few hours.
 
user1804599
No it's actually that I think dinner is near but actually isnt
 
user1804599
2:37 PM
The BBQ has just started warming up apparently
 
user1804599
Usually we eat at five o'clock.
 
user1804599
Ven I struggle with type params
 
Ven
why
let me rubber duck you
5
 
user1804599
(method id (T) () (=> T T) (fn (x) x))
 
user1804599
2:44 PM
I don't really like this
 
Ven
what's the ()?
 
user1804599
Value params
 
Ven
this would make much more sense:
(method id (T) (=> (x T) T)
  x)
 
user1804599
Yeah but you can't pass that around.
 
Ven
yeah but the type annotation has to be on (fn) anyway.
 
user1804599
2:49 PM
public function id<T>(): (function(T): T) { return $x ==> $x; }
 
user1804599
This is the translation.
 
Ven
ok
 
user1804599
I don't really know another way to do it. Can't be a property instead of a method because it's generic.
 
user1804599
And it has to be a in a class because auto loading sucks
 
nwp
TIM to integrate cppcheck into Qt Creator
(TIM = Today I Managed is a thing right?)
it doesn't do the jump to code thing yet
 
2:52 PM
@Zoidberg I witnessed a presentation on Go today, and it seemed rather nice. What is your opinion on Go these days?
 
user1804599
Go is great.
 
user1804599
It is an excellent language for concurrent and network applications.
 
@fredoverflow its syntax is quite shitty
 
nwp
also apparently a lambda capturing an 8 byte pointer and a 4 byte int gets 4 byte padding. Who puts lambdas in an array?
 
why are you surprised
 
2:56 PM
@nwp it's also important for class members
 
this is regular alignment rules
even abyx knows that
 
Ven
$ git merge --abort
fatal: There is no merge to abort (MERGE_HEAD missing).
$ git checkout feature/x
src/File: needs merge
fuck you git
 
nwp
@Abyx lambdas as class members? really?
 
@nwp sure
if it's templated, for example
 
@nwp yeah, why not
listen to the insect
 
user1804599
2:59 PM
@nwp why not?
 
user1804599
Stuff like std::bind does that when you pass it a lambda
 
user1804599
You are making the mistake of not considering generic code.
 
user1804599
BREAKING: a man attempted to shoot journalist Can Dundar in front of Istanbul courthouse as he awaits judgement on his trial.
 
user1804599
Sick fuck
 
nwp
I don't know, it makes sense to have that. I just for some reason didn't consider it. Some day I will get past being a badlet.
 
3:03 PM
@Abyx Examples?
 
Ven
Today I wrote bits of Haskell, C++, Racket, Smalltalk, Perl, Rust, and Perl 6. Today was a good day.
 
user1804599
@fredoverflow generic scope guards, std::bind, range transformation etc
 
user1804599
@Ven I wrote Hack, Haskell, and a hypothetical dialect of F# with HKT
 
Ven
yay for hypothesis
 
user1804599
Imagine it weren't hypothetical
9
 
3:06 PM
ven if you have so much free time you should help me with hate
 
Just wrote a bit of C++ and some documentation.
 
Ven
@BartekBanachewicz today's a special day because I took it off, I usually don't have that kind of free time :P
also I don't see much that interests me in Hate, tbh
(not that it's a bad project, just that... I'm looking at other stuff right now, and I don't like to drop projects.)
 
I aso took the day off, but it wasn't really a choice.
 
user1804599
I also wrote a lot of docs today
 
user1804599
It was fun
 
nwp
3:09 PM
@Zoidberg what's the percentage of curse words? 20%?
 
Ven
@Zoidberg lol, remember your ExprID shenanigans for Mill-hs?
goddamn that's ugly
 
user1804599
Yeah it was terrible
 
Ven
I don't even remember why you did that
 
user1804599
Making a type parameter is much better
 
user1804599
@nwp 0
 
nwp
3:11 PM
disappointing
 
TIL that member pointers are not actually pointers
(by C++ type classification)
 
user1804599
A percentage of 20% is 0.02%.
 
user1804599
That's also close to one of 0.
 
Ven
@Zoidberg what were you trying to do
 
user1804599
@Ven dunno anymore
 
3:13 PM
@milleniumbug Member pointers don't exist. You're only having a nightmare.
8
 
...I mostly wrote CMake today. Which is vast improvement over the last few months of actively battling JabbaScript.
 
CMake isn't that terrible
> ImageMagick allows to process files with external libraries. This feature is called 'delegate'. It is implemented as a system() with command string ('command') from the config file delegates.xml with actual value for different params (input/output filenames etc). Due to insufficient %M param filtering it is possible to conduct shell command injection.
when they will learn
 
Ven
LOL
 
@milleniumbug ISIS is fine
 
I had a problem. I've used bash, and now I have two problems and my shell is shocked
 
3:20 PM
When working with std::string 's , is there a OS agnostic way to at a new line, such as std::endl? eg. mystring += newline . but without a stringstream?
 
@milleniumbug I'm shocked by that. Like a fish.
@USERID_UNK With std::string's what?
 
@Griwes plural
 
Ignoring the grammar nonsense though, err... '\n' is the newline character.
What's the question again?
 
but some systems also like \r in there
@Griwes like a typewriter
 
It doesn't matter.
\n is the newline character.
All the \r nonsense is handled by the stream you are outputting to (assuming it's open in text mode).
 
3:22 PM
Typewriters aren't systems
 
@Griwes ok
 
Oh, it's raining outside now :o
 
assuming you don't need to handle empty lines, you can just use boost::char_separator<char> sep("\r\n"); and use boost::tokenizer on that
 
But the whether's still rather hot.
 
@набиячлэвэлиь classical systems that think that a return carriage is important
 
3:23 PM
@USERID_UNK Again: that is handled by the I/O layer.
 
nwp
I need a static_if which I don't have to get around not being able to declare a void variable...
 
@nwp Either 1) make the expression return an empty struct instead of void or 2) specialize the function.
 
nwp
yeah, gonna have to do something with result_of
 
@fredoverflow no generic programming. Shitty result, err := idiom where you can forget to check err. Nil pointers which are kinda outdated in 2016. Weird rules about scopes and :=. Lots of dynamic casts. Nil interfaces which are not nil and other minor stuff.
@fredoverflow well it doesn't hurt to try it
 
@nwp eww, result_of
There's always a better way to do that (and yes, decltype(invoke(stuff)) is also usually one of them ;_;).
 
nwp
3:28 PM
I can get around it by just making a new function that does the right thing directly
 
@Griwes Sometimes std::result_of_t is clearer.
 
@USERID_UNK Your input shouldn't care whether you're dealing with \r\n or \n, your output should output the same newline sequence (doesn't matter which one, unless you're trying to conform to some externally specified format), independent of the OS you're currently running (that is: not the thing that text mode of streams does by default)
 
But it's generally when std::is_callable is even clearer.
 
@Morwenn Maybe if you need to declval every variable, you don't see many cases of that.
 
@Griwes Well, I often already have the types, so not std::declval or decltype needed .___.
 
3:31 PM
you should forget about "your current OS's newline" concept, fuck that
 
Hey, I could provide a fixed-size span.
 
@fredoverflow ah, and go get is total shit because you cannot specify version. So they added "vendoring", i.e. you put all your dependencies in ./vendor/
 
Ven
4:03 PM
@Morwenn depending or weather you like rain or not..;)
 
@Ven Wow, dat spelling mistake .___.
 
Ven
❤️
@Morwenn btw, what kind of books do you read? I have a mild guess
 
But I'm not hot under the rain, sarry :p
@Ven It's been months since I last read a book to be honest.
What's your guess?
 
Dinosaur erotica
 
Ha, I should try those :D
 
4:07 PM
so my fingertips turned into blisters
it hurts to type now
 
@BartekBanachewicz why
 
@BartekBanachewicz if you were using dynamic typing, I'd suggest using static typing, but you're already using that, so I can't help
 
@milleniumbug maybe i could try weak typing
@набиячлэвэлиь guitar
 
@BartekBanachewicz just press the keys very softly
 
soft typing
I'm gonna watch a movie instead
 
4:22 PM
Whenever I hold my mouse's left button for too long it freezes...
 
user1804599
@Ven how does the Racket Java backend deal with classes?
 
user1804599
> ProfessorJ is a plug-in for DrRacket that implements variants of Java, especially for teaching purposes.
 
user1804599
Oh, it's a Java implementation, not a Racket back-end.
 
user1804599
Insane.
 
Ven
@Morwenn heroic fantasy
 
user1804599
4:37 PM
(namespace FH
  (defmodule F
    (defgfn id (T) () (=> T T) (fn (x) x))
    (defgfn constant (TI TO) (x TO) (=> TI TO) (fn (y) x))
    (deffn zero () (=> int) (fn () 0))))
 
@Ven I did read much heroic fantasy at some point, but my most recent reads were quite different.
Well, there was some Ursula Le Guin recently to be honest, and that's indeed heroic fantasy. But it feels so different from regular heroic fantasy.
 
user1804599
(deffn f p r b) is short for (defgfn f () p r b).
 
user1804599
I.e. no type parameters.
 
user1804599
Hmmm.
 
user1804599
Lack of syntax is puzzling.
 
user1804599
4:42 PM
@Ven throw opinions at me
 
user1804599
lol the PHP manual refers to backwards compatibility as "past mistake"
2
 

« first day (2029 days earlier)      last day (2909 days later) »