« first day (2680 days earlier)      last day (980 days later) » 

9:32 AM
any regEx champions here ?
I know some basic regex but nothing complicated, so I'll say no
well I can still try you
I need to split this log line into it's "words" so to say
[20-Nov-2015 14:49:55 +0200]: Successful login for username (ID: 299) from ip in session 70573git16bu1otp0jpugm8q14
the problem is the damn space in the timespamp and the ID
What do you have at the moment?
f.Line.Split(' '); :D
i do not know RegEx at all
Well, I don't know anything except for actually how to match certain characters ;P So I in all likelihood won't be able to help
(I need it for SmokeDetector stuff. That's it :P)
9:55 AM
I'd just hack it in
Search first for ": " or something
nah I'm just recombining the elements after the initial whitespace split
probably the most hacky thing I've wrriten this year
string[] correctParts = new string[]{parts[0]+ parts[1]+ parts[2], parts[3], parts[4], parts[5], parts[6],parts[7]+parts[8], parts[9], parts[10],parts[11], parts[12], parts[13] };
10:58 AM
@UriPopov What are the meaningful components here? Do you want to extract the date + username + ID + ip + session?
hello i like regex
@UriPopov which elements do you need in the end?
and what lingo are u using to execute the regex?
@dot_Sp0T have fun with this then: regexcrossword.com =p
nah guys drop it I hacked togheter a solution that works. This is a one time type of deal it does not need to be doe right just work
Look at the "match information" in the center right and if that is what you wanted call it a success.
11:22 AM
@UriPopov ah c'mon, you can't let me hang like that
sorry was not at pc. This seems to be able to do the job yes
@nwp you should use \s instead of ' '
techniclly username should be in its own group and the entire timestamp should be one
How stable is the text? Can you just hardcode "Successful login" or should it also work for "Login failed"?
@nwp wow, cool
11:29 AM
I filter out all the Successful logins when reading the lines
so the regex will only work with Successful logins
That is almost readable. That probably means I'm doing regex wrong.
@dot_Sp0T Not sure. Probably. Guess it depends on the log.
User names can have spaces right? It's not gonna work for those.
Never mind, it does.
@nwp could be either U+0020 or U+00A0
@nwp nice thanks
@dot_Sp0T Good enough? I never ran into that problem. Mostly because I never really used regexes for anything :P
@nwp :) I'm currently going over it
How about this? - I'm not really happy yet, because there should be a set of defined characters for the user-name and the timestamp should probably also be defined. but yeah
11:48 AM
Doesn't match user name correctly. And probably matches failed logins which is not the goal.
@nwp I understood it to be only applied to sucessful logins
also yeah, I missed the username having a space
@dot_Sp0T Yes. But you don't check if the string is "Successful login". If it is "Login failed" you will still match it.
@nwp Again, I understood it such that the regex will only be applied to sucessful logins. So why would I check for that again?
you would not
I understood that it is to search for successful logins in a long log.
11:54 AM
@nwp in that case it makes sense to check for it
no I only get lines that have successful in them and then I need to apply to regex to explode the line and insert the needed data into a DB
Cool. Is there some IPv6 in there? Currently the IP group doesn't match 2001:0db8:0000:0000:0000:ff00:0042:8329.
I'll update with some better ip checking once I'm out of the classroom
I dont think there are IPv6 in there but then again the log file is about 500k entries so I dont really know :D
Only allows success in life? Ouch.
12:02 PM
What would be a clean way to push multiple values into a vector at once?
I found that insert might work with an in-place array { vertex.Position.x, vertex.Position.y, vertex.Position.z } but that also requires the end iterator of the vector which would require me to save the vector that's fetched from the map to a local variable
I don't think there is an elegant way. auto &v = result[VertexAttribute::POSITION]; v.insert(std::end(v), { vertex.Position.x, vertex.Position.y, vertex.Position.z }); is probably as good as it gets.
aight, thanks
It'd be cool if push_back was essentially a short hand for insert(std:end(this), parameter);
If it really bothers you you can write a function for it and then use append(result[VertexAttribute::POSITION], { vertex.Position.x, vertex.Position.y, vertex.Position.z });.
I mean you could write a helper/wrapper for this if you do it often
Yeah. I guess since this happens in a loop it's cleaner/maybe even faster to just fetch the vectors inside the map outside of the loop and then just do the insert stuff inside the loop
std::map<VertexAttribute, std::vector<float>> COpenGLVertexArray::SeparateVertexData(const std::vector<SVertex>& vertices)
	std::map<VertexAttribute, std::vector<float>> vertexData;

	std::vector<float>& positions = vertexData[VertexAttribute::POSITION];
	std::vector<float>& textureCoordinates = vertexData[VertexAttribute::TEXTURE_COORDINATE];
	std::vector<float>& colors = vertexData[VertexAttribute::COLOR];

	for (const SVertex& vertex : vertices)
		positions.insert(std::end(positions), { vertex.Position.x, vertex.Position.y, vertex.Position.z });
12:14 PM
<insert joke about gamedev and STL here>
yeah... my stuff is terrible for a whole bunch of other reasons than STL :D
12:59 PM
STL is a cpp lib isnnit?
1:12 PM
The standard library.
There are some people out there who say you must never ever use any standard thing in gamedev because then it is not specific to the game and can by definition not be up to the requirements of the game.
I strongly disagree with that.
1:37 PM
that sounds absurd
do they avoid using int?
totally when a char would do :D
@doppelgreener No, but I heard them recommending implementing bubblesort instead of using std::sort because with your own bubblesort you understand what you are doing and can optimize while std::sort is a blackbox.
@nwp that gives me a sad
i'd use std::sort until such time i can identify it as a performance bottleneck
what they're doing there is recommending premature optimization, possibly without any actual optimization performed, instead of actually doing game work
@doppelgreener That is the conventional wisdom. You have just disqualified yourself from being part of the handmade movement and have to suffer being productive.
1:48 PM
@nwp oh no........
handmade movement?
as in the handmade hero stuff?
It has spread to quite a few more people but I believe he is the origin of that ... idea.
I don't even understand writing code that looks that much like C
How does sprite batching conventionally handle scale / rotation?
Do I calculate those into the vertices I add to the batch or are those attributes for the vertices?
2:20 PM
morning chat!
2:37 PM
Good morning!
I made an object which basically is behind my player like 20cm away or so. It keeps running forward and once it touches the objects or collide, it destroy them and I will make it invisible, though player still can't see the object since it's behind the player. But is it a efficient way to destroy objects?
And it is working like that
Sounds pretty clever.
Efficiency is something that you need to profile.
Haha. But when I change my player position back to 0, I am not sure those objects will be there or not haha.
But I don't understand profile stuff. It's hard to understand
Yeah those won't be there if you destroy objects, obviously.
When your player teleports to 0, you may necessarily have some cleanup or setup work to do.
2:42 PM
Then I will have to figure another way to keep my scene running forever
I'm not really convinced that deleting static objects behind the player will help at all TBH
Yeah when it reaches to 0, I can probably add objects back or something
But deleting objects which help make it effiecient
Since Unity does frustrum culling, I don't see what kind of load on anything the objects that aren't rendered would cause?
You can edit messages by pressing the up arrow.
Sure, but it don't delete the objects which are rendered. So once it rendered a lot of things then it'll cause performance issues
Have you tried enabling & disabling the renderer instead of destroying the object?
2:44 PM
I am using culling. How would enabling and disabling help?
Like disable them once the camera can't see it?
How would destroying help?
There won't be lots of objects, so it'll help with the performance, but if there is a lot of objects then it might lag
Well destroying objects that are culled is mostly just making the culling faster.
So my idea with disabling the renderer would be to remove the object from the culling list, achieving the same result.
My game run very smooth but after few seconds or a minute it starts lagging and it's probably bc it has so many objects
Anyone worked with STB truetype?
2:46 PM
But since the object isn't destroyed, it could be made visible again once the player needs to see the object again.
Culling faster? Do you mean increase the speed?
@Hemlata Probably isn't something that I like to hear here.
Um yeah
Yes often times "faster" means an increase in speed.
But how does disabling would help? bc objects are just disabled, but still consuming resources since we didn't destroy them.
2:49 PM
2 mins ago, by Tyyppi_77
So my idea with disabling the renderer would be to remove the object from the culling list, achieving the same result.
How do you do that?
I don't know how to disable.
It won't obviously help with RAM, but using lots of RAM doesn't slow the game down.
Did you try to Google that?
But I will
2:50 PM
I can share you a helpful LMGTFY link if you want to, but I'd rather have you google it yourself
Yeah I will google it
Let Me Google That For You
Nah haha. I can google it by myself.
It's a pretty rude tool that's used when someone asks a question that google would provide an easy answer to
Yeah, but I didn't thought about it and I don't ask anyone to google it for me. haha
But does it help with any performance? Bc I am doing that to just make my game efficient otherwise I don't need to delete it
2:53 PM
Honestly the profiling thing that people keep mentioning is how you find that out.
Nobody can tell you how much it helps with performance unless you -- you, personally, yourself -- profile it.
Yeah, but it's hard to understand profiling
Well, you need to.
You are asking these people questions they cannot answer for you because you must understand profiling and answer them yourself.
If I share the screenshot of my profiling can you just tell me what it is causing the performance not that good? I mean if it's in my script or gameObjects then I can try to fix it
2:56 PM
I'm not using that "must" lightly. You're putting in effort to obtain performance, speed, efficiency, etc -- all of that is worth nothing if you do not profile. If you do not profile, you do not know what the speed, performance, efficiency, and so on are, you cannot understand what is actually making things slow, and you cannot measure what various changes do to improve (or worsen) performance.
@Hemlata No. You must profile it yourself and learn how to operate those tools for yourself.
Um yeah
But I really can't understand any word in it
Well, google and learn about it.
Um ok.
There is a saying: we can give someone a fish, and he will be full for a day. But if we teach them to fish for themselves, they will be full for a lifetime.
Um yeah I know, but I do try to understand it. But it's hard, though I will figure it out.
2:59 PM
If you show us a profiling screenshot, we may be able to identify something in it. But usually profiling is complex enough that anything that's in a single screenshot is inadequate for actually figuring out what's going on -- there's data to explore which won't fit in a single screenshot. Further, we'd only be helping you in that one instance (giving you a fish).
Yes, profiling is actually complex and takes some time to figure out. But you really, really, really do need to figure out how to use it for yourself. Because this is the kind of thing where you need to figure out how to fish.
is it different for phone and laptop?
Different devices have different performance bottlenecks
Performance or profiling?
3:00 PM
I mean it works pretty good on laptop but on phone it lags
@Tyyppi_77 Yeah
@Hemlata That's normal. Phones are usually slower.
So you must investigate to find out what's making it lag on your phone, and address that.
If I build a PC with a great CPU and a lousy GPU, the GPU will be the bottleneck there
Yeah but I don't want it to lag on phone
3:01 PM
If I build a PC with a lousy CPU and a great GPU, the CPU will be the bottleneck there
how do you profile on phone?
@Hemlata Google that for your development tools.
"how do i profile on my phone in unity" etc
3:02 PM
I have did. On phone there is an option in the developer but it only show like just 3 numbers
Like something 12.5/30/22
that's all it show on phone
"show on phone"?
does that mean that those numbers are displayed on the phone screen?
or that those numbers are everything you see in the Unity profiler?
No, not on unity profiler. On phone it shows those 3 numbers in the upper left of the screen while game is playing
Unity profiler is the one I showed
In the picture
Those results in the profiler don't really seem to indicate any kind of lag, those are pretty great results on a phone IMO
3:11 PM
No, those results are of my game when I run on laptop
I will show the profiler result of phone as well. It's charging right now, so I will show in a bit
Well you don't really need to show those
You just need to interpret those yourself.
But it's hard to understand. It just show 3 numbers like 12.5/20/30 in the top left of the screen
Those aren't the numbers you're interested in.
Does Unity not give you a similar view inside the editor when profiling on phone as when profiling on PC?
No, profiler doesn't work in my laptop if I connect my phone in my laptop and run the game.
It only works when my game is running on laptop
And is that just something Unity doesn't support or have you not set something correctly up?
3:15 PM
I am not sure about it. But I will look it up.
I think it'll work. I probably have to turn off wifi in the phone. Or something else. But I will look up more and show you the profiler in half an hour if it worked.
I am hungry haha, so I'm gonna have dinner and then try to figure it out haha
@Tyyppi_77 unity does support profiling on device
@Hemlata you gotta work on your google skills man.
"unity profile on ios device" turns up how to do it for ios
3:33 PM
If there is a programming thing you want to do in a tool/language, google the tool/language and the thing. Programming as a profession is driven by google.
Kingdoms and Castles is fun
played another hour last night when I couldn't sleep
@Almo Women*
Yeah I will
I don't have IOS phone I have android
come on man
just google "unity profile on android device"
seriously, if you can't generalize this, you'll have a really hard time developing games.
Is it like saying "come on man" haha. Bc no one calls a girl man haha
streaming opus magnum
3:42 PM
Nah developing games isn't hard but making them effecient is
Efficient *
developing games is damn hard
Yeah probably
But I think it's more difficult to make it efficient
that's part of developing games
Today I learned that if someone set the userID field in the DB to long you cant cast it to int in your code :D
top kek
3:51 PM
I'm working on a sprite batcher and in addition to nothing getting rendered my performance is awful lol
It's nicely constructing one massive batch
how many sprites did you have on the screen before you decided you needed the batcher?
apparently enough
well a separate draw call for each sprite wasn't really effecient anymore
but I wasn't drawing even a ton of stuff
ahhhh I wasn't clearing the batches between frames
Got like 170k vertices from 40 sprites
hmmm OpenGL?
3:59 PM
so now performance is cool but nothing is rendered :D
gotta start up some debugging
developing games is easy in the sense that building a bicycle is easy. The hard parts are just making it move, comfortable to sit in, something you can steer, making it not fall apart the moment it reaches the road, making it able to go over bumps, making sure you can actually pedal it, maintain speed, brake, and otherwise ensuring people can actually use it to get anywhere alive and want to and be able to use it a second time.
@doppelgreener but can you phrase it as a car analogy
@Jimmy no, the car just crashed into the bicycle's rider and is being impounded.
(to the bicycle rider)
so the analogy is "driving a car is easy, it's avoiding the cyclists and pedestrians that's tricky"
also the other cars, the street poles, the road boundaries, all the buildings, the curb, the lane boundaries...
4:08 PM
Anyone tried rendering box-drawing characters with STBTrueType?
Hi, I want to know what is the GUI framework that the Godot game engine used?
Is anyone know about that
@Tyyppi_77 anyway, I was curious about the numbers ,because a while back I thought of building a OOP-ish SpriteBatch implementation that allowed for moving, creating, and deleting sprites by appropriate use of BufferSubData but I was never sure if that was actually a good idea versus just a "buffer a bunch of drawSprite calls" type of API.
I found a bunch of drawSprite calls pretty slow
I could've probably done some more extensive profiling to see what was the issue
@DININDU Godot is open source, why not go and look yourself?
@Tyyppi_77 yeah i just opened the code also. Im really new to c++, this is bit difficult to me
find the how they write the gui :(
looks like custom gui to me
4:15 PM
I just realized something, which is those all ui components based on control.cpp :|
custom gui code get's messy really fast
@DININDU That's not an uncommon design.
Everything in Win32 is a "window," including buttons, labels, et cetera.
I wonder if it's worth editing my old answers that linked to a jsfiddle by replacing with inline js snippet
@JoshPetrie wait wat?
4:22 PM
oh, is that why everything has an HWND?
@JoshPetrie Really... so is it customized as they needed?
That default windows gui components
> In addition to frame windows, several other major categories of windows are derived from CWnd:
> * Views
> * Dialog Boxes
> * Forms
> * Controls
> * Control Bars
They don't use Win32, Josh was just pointing out that Win32 has a similar class hierarchy
has OOP gone too far?
4:26 PM
just a badly named base class IMO
But godot is cross platform, how this gonna be possible in others
mac linux :(
#ifdef all the things!
It's custom UI
It runs on all platforms
No extra code required
Forget the Win32 discussion, it wasn't an answer to your question
@dot_Sp0T HWND is used for basically everything in the classic Win32 API.
Every "control" in a classic Win32 application is a "window" as far as the API is concerned. All the same type.
4:29 PM
@DININDU I don't know how Godot works, all I'm saying that if Godot works by deriving everythign from a common "Control" class defined in control.cpp, that's not unusual.
That's how GUI frameworks are often built.
@Jimmy CWnd is from a Win32 wrapper.
And likely uses that inheritance tree because it's easy, because in the underlying Win32 API everything is a HWND, and it's only data that determines how a HWND for a top-level window and a HWND for a button in that window differ.
@JoshPetrie every button rendered?
Or do you rather mean every singular control?
Every single control.
4:31 PM
that is very interesting
Every label. Every button, every text box, every scroll bar, every list box.
All HWNDs. Some with child HWNDs.
very scaryinteresting
@DININDU If they're deriving everything from Control, Control will just be implemented using Win32 on Windows, Cocoa stuff on macOS, et cetera.
"Control" is likely their abstraction over the native windowing system. It's their cross-platform layer.
4:32 PM
Now I'm fighting to get my fontrenderer to render box-drawing-characters AND I am scared by win32
It's not a particular scary design, really.
In this control.cpp file i can see only one global include
It's compact and efficient.
which is #include <stdio.h>
@DININDU Why don't you link the file you're looking at from the GitHub repository. Then we can talk without speculation.
There's a ton of #includes in here.
Yeah that one
But you're right, no windows includes, et cetera. So this Control is not actually the platform abstraction part of the GUI.
It's just a base class for controls that doesn't itself deal with OS stuff. That's elsewhere.
4:36 PM
Possibly in os/os.h
it doesn't look like it uses native widgets
yeah I'd guess it just goes to a renderer or something
Yeah, github.com/godotengine/godot/blob/master/core/os/os.h mostly rendering abstractions
(outside of the logging, etc, stuff)
it looks like, for example, button.cpp calls resources/StyleBox which just draws some kind of box to a texture
4:39 PM
github.com/godotengine/godot/blob/master/scene/gui/panel.cpp in here is a panel also. but i cant see any drawing here
probably because it's a base class for other controls
there's some drawing code
As a web developer, looks like c++ based guis are totally terrible :D
All GUIs are terrible.
Except the ones that (a) are trivial (b) you already know really well.
4:42 PM
yeah but have you looked at the browser's code to render your <button>s
it's just hidden underneath a bunch of abstractions
No, i only saw shadow roots only.
thats all
This part of it isn't really "terrible," it's not very far from what your web-based thing will fundamentally present. All GUI elements -- buttons, etc, whatever -- share some common properties and functionality. Wrapping them up in one place is a good idea.
Whether that's via inheritance or composition or whatever is really an orthogonal issue. And as far as implementations go, Godot's approach of deferring to self-drawn stuff is probably better if you're not actually trying to mimic the look of native GUIs
lol I'm having some shader issues and accidentally created a pretty cool cool and shady color theme thingy:
Because it has fewer moving parts and less abstraction cruft.
4:45 PM
I think it's just C++ being verbose. This button drawing code seems to basically an immediate-mode "draw a box styled based on the current control state, and draw some text in the box"
actually, not even C++'s fault, yeah, there's just less abstractions. like, if you were trying to make the code pretty you'd probably stuff all the text metrics code in some utility function
Ohh that a big deal
It's also looking like the GUI treads water in the awkward phase between basic and full-featured.
^ I feel like that happens very easily too
It's not super trivial, so some of the drawing code is a bit verbose. But it's not supporting all the crazy OS-level stuff like IME and text marking, assistive features, etc
So there's only so much wrapping up that needs to be done.
5:02 PM
woot I'm finally caught up on adventofcode @PearsonArtPhoto :D
although getting on the high score list seems really hard
2 hours later…
6:37 PM
It is...
If I was going to do it, I would have to re-adjust my entire life...
I'm just not up at the time of day that they release the new day's item.
6:48 PM
@Tyyppi_77 time to have a blacklight neon laser fortress
7:23 PM
Anyone here good at matrices and/or openGL?
I'm struggling big time with getting my enemy object to face the player object :/
Just add "Bathesda" to your intro, charge 60$ and release as is.
7:37 PM
@nwp lol
Seeking comments, advice: I'm refining my copy for the initial Mbrane posting on Board Game Geek. I'm going to avoid praising the game, as that is subjective, and try to focus entirely on game play. Let me know if you have any thoughts on my initial draft:

Wholly original mechanics, unlike any previous game in its class.

Game of pure skill, with significantly less rules than chess and no special conditions.

Utilizes Sudoku as the context for a tile-based strategy game which introduces blocking factors (resource stealing strategies). Factorial nature of the gameboard provides effectively infinite replay, despite max 81 turns and 10 minute average game time

Designed in the spirit of medieval tile games, currently in abstract form--gameplay may be understoo
streamin rocket league
@Tyyppi_77 nice haha :)
8:01 PM
There, for all of you grumpy out there: winterbash2017.stackexchange.com
Didn't we vote ourselves out of it this year?
Christmas is cancelled.
@AlexandreVaillancourt I had my fun with that already.
@JoshPetrie Did we?
@JoshPetrie voters ruin everything
8:07 PM
Yeah, it seemed like a lot of extra work... we figured you could just go look at some other sites. If they get hats, you can see them there.
You folks are a boring crowd today.
Troll Almo on twitch.
Sorry to be so ignorant, but what is "winter bash 2017" exactly?
Winter Bash is an end-of-year event SE has.
Where sites that don't opt-out of the event get "hats" which users can earn by doing a variety of things on the site.
8:18 PM
You can then display the hats on your avatar on the site.
Oh nice!
There is a "I love hats" / "I hate hats" somewhere which turns this on/off.
So are we in or out?
I'd love to have an hat for my avatar :P
@GabrieleVierti You have to work hard to catch them all.
8:27 PM
And do some research.
We've never opted out, and never even bothered to consider it.
9:04 PM
@AlexandreVaillancourt kinda like pokemons
So noone here has an hat?
Well the event hasnt started yet
So no hats yet
9:36 PM
Aww yeah, got full points on that lame text game I had to write
It was even the assistants favorite lol
@GabrieleVierti They are temporary; they go away forever after the end of the event.
10:33 PM
Looks like Steam has a special sale right now on games that starts at the end credits. Something about 100 year independence on Finnish games.
10:50 PM
for some reason I had trouble finding it
11:21 PM
If anyone wants to join a private leaderboard to compare Advent of Code performance, use 250798-fda9bea8 at adventofcode.com/2017/leaderboard/private

« first day (2680 days earlier)      last day (980 days later) »