• What are you working on? v67 - March 2017
    3,527 replies, posted
[QUOTE=johnnyaka;52346152]AFAIK searching stuff in mongodb is super slow and there exists way better DBS for logging purposes. I think it's suitable for prototyping since you can get started very quickly and the schemaless makes it easy to adapt [editline]12th June 2017[/editline] Well, seems mongodb is indeed used for logging stuff, NVM then.[/QUOTE] AFAIK it's popular amongst some of those private servers for World of Warcraft - my flatmate is part of the dev team of one and I *think* they use that for all their backend database.
[QUOTE=JWki;52346369]AFAIK it's popular amongst some of those private servers for World of Warcraft - my flatmate is part of the dev team of one and I *think* they use that for all their backend database.[/QUOTE] Just sounds like another coincidental bad choice by developers wanting to try it out because it's hip and modern. Tends to happen even more often in private server communities :v:
[QUOTE=geel9;52341006][...] The query language sucks. Queries are JSON documents. Here's two queries, one for Mongo and one for MySQL. [code] db.items.find( { "$or":[ "Bot": 15, "$and": [ {"User": 17}, {"$or": [ {"Price": {"$ne": 15}}, {"TimeUpdated": {"$gt": 1600} ]} ] ] } [/code] [code] SELECT * FROM `items` WHERE `bot` = 15 OR (`user` = 17 AND (`price` != 15 OR `time_updated` > 1600)) [/code] Which is easier to parse? It's kind of a nonsense query -- I don't know if you'd ever get useful data with that sort of query -- but it demonstrates the point. [...][/QUOTE] To be fair, it looks like the JSON query is actually native-ish and not really parsed at all (unless it actually sends that over the wire as text in which case :why:). Assuming that's JS, you can also drop the quotes. The syntax is outright atrocious though, even without operator overloading it would be pretty easy to make it much more sane by providing functions for those operators (and possibly flipping the innermost layer). [code]db.items.find( or( eq('Bot', 15), and( eq('User', 17), or( ne('Price', 15), gt('TimeUpdated', 1600) ) ) ) );[/code] With operator overloading (and a type-checked, locally available, schema), I'd probably write it as [code]Items.Where(bot == 15 || user == 17 && (price != 15 || time_updated > 1600))[/code] though. To me at least, the quality of available DB interfaces seems unfortunately pretty low pretty much all across the board. Even if you disregard e.g. LINQ, there's still a lot that would be possible with a fairly simple code generator (that's fed the database schema, so that, at least, is indeed not something that seems beneficial whatsoever to avoid).
[QUOTE=Perl;52346402]Just sounds like another coincidental bad choice by developers wanting to try it out because it's hip and modern. Tends to happen even more often in private server communities :v:[/QUOTE] IDK I think they've been using it for like ten years now :D
[QUOTE=JWki;52346850]IDK I think they've been using it for like ten years now :D[/QUOTE] Are you sure you aren't mixing up the name with a popular server emulator, MaNGOS? :v:
[QUOTE=Perl;52346908]Are you sure you aren't mixing up the name with a popular server emulator, MaNGOS? :v:[/QUOTE] I was just about to post that I checked with him and they're using MySQL and yes that's pretty much what went wrong here. Can I rate myself dumb please
[QUOTE=Tamschi;52346419]To be fair, it looks like the JSON query is actually native-ish and not really parsed at all (unless it actually sends that over the wire as text in which case :why:). Assuming that's JS, you can also drop the quotes. The syntax is outright atrocious though, even without operator overloading it would be pretty easy to make it much more sane by providing functions for those operators (and possibly flipping the innermost layer). [code]db.items.find( or( eq('Bot', 15), and( eq('User', 17), or( ne('Price', 15), gt('TimeUpdated', 1600) ) ) ) );[/code] With operator overloading (and a type-checked, locally available, schema), I'd probably write it as [code]Items.Where(bot == 15 || user == 17 && (price != 15 || time_updated > 1600))[/code] though. To me at least, the quality of available DB interfaces seems unfortunately pretty low pretty much all across the board. Even if you disregard e.g. LINQ, there's still a lot that would be possible with a fairly simple code generator (that's fed the database schema, so that, at least, is indeed not something that seems beneficial whatsoever to avoid).[/QUOTE] When I said "parse" I actually meant for a human. Guess that's not a term you should use interchangeably around programmers.
Learned Scala and Spark to do Twitter sentiment analysis on fidget spinners. (yes that's my github if you're interested) [t]http://i.imgur.com/YetRazF.png[/t] Pimped my emacs (it's just spacemacs with doom-one theme on top) [t]http://i.imgur.com/8TS3vYV.png[/t]
Oh my god that's a beautiful emacs
[QUOTE=Tamschi;52346419]The syntax is outright atrocious though, even without operator overloading it would be pretty easy to make it much more sane by providing functions for those operators (and possibly flipping the innermost layer).[/QUOTE] I remember [URL="https://www.arangodb.com/"]ArangoDB[/URL] having SQL-like syntax when it allows for document-based database
[QUOTE=paindoc;52344922] Awesome planet rendering stuff [/QUOTE] I don't post very often, but I just wanted to let you know that I think your Planet Rendering project is fantastic and inspired me to do something similar, if not exactly the same, for my Masters Dissertation. I'm not sure how far I'll be able to take it over the few months I have but I'll just be happy if I manage to achieve half the cool shit you have. Keep up the awesome work, I'll be here lurking and following along!
I just wrote like 5 hours of code without testing and it all just compiled and worked perfectly. I know it's terrible practice and something I should never admit in an interview, but I hate testing so I'm pretty stoked right now.
Last week I spent about a day on a newish project getting the storage of times and dates all sorted out (there were hard-coded time-zones in some places). Glad I nipped it in the bud because I've seen how painful time can be when done wrong. About half way through I had the realisation that it's just an extension of the separation of data and presentation rule - store as UTC and the presentation is the time-zone.
[QUOTE=SimonRhys;52352090]I don't post very often, but I just wanted to let you know that I think your Planet Rendering project is fantastic and inspired me to do something similar, if not exactly the same, for my Masters Dissertation. I'm not sure how far I'll be able to take it over the few months I have but I'll just be happy if I manage to achieve half the cool shit you have. Keep up the awesome work, I'll be here lurking and following along![/QUOTE] Thanks! Do you have a lot of resources stashed for your dissertation? If there's one other thing I'm good at, it's google-fu. So I've got loads and loads of resources from a textbook all about planet/globe rendering to several interesting articles/posts about planet rendering. I've got a whole stockpile of resources about this stuff, and I wouldn't have made it nearly as far as I did without them and the work of others before me. I also got [URL="http://i.imgur.com/aPq3mLs.png"]fairly far[/URL] on this in OpenGL - if you need help doing things like an [URL="http://i.imgur.com/0wgkfli.png"]improved cubemap-to-sphere mapping for mesh generation[/URL] let me know and I can help you out with that. On the topic of the planet rendering though, I've identified a few key problems. First, there's an off-by-one error in the sampling between different LOD levels: [t]https://cdn.discordapp.com/attachments/298189625573376002/323713923108962304/shift.PNG[/t] I think this error relates to the next one, but the next one causes incorrect heights to be used outright so I decided I'd have to return to this once I get height sampling to stop artifacting/being wrong. The upsampling filter I use looks a bit like this (from Proland [URL="https://proland.inrialpes.fr/doc/proland-4.0/terrain/html/index.html"]here[/URL]): [t]http://i.imgur.com/x3jE4BG.png[/t] Initially I was having errors with the filter due to how I generate my meshes, so I fixed that. Then I started noticing that I was getting repetitive artifacting in the heights, no matter what noise generator I used to generate the heights. So I wrote a quick method to generate alternating peaks/valleys at +30/-30 to see where the error is: turns out that when the "grid" coordinates of a vertex in the plane containing the mesh are both odd, the vertex's height value always goes to zero. I'm not entirely sure why this is, tbh. That's going to be the yellow dots in the above image, which is the most complex filter. I've stepped through the method a ton, and I'm not sure why things all go to zero. I even checked to see if it was possibly an error that occurred at the base LOD level, where I use the raw height data - but, nope. The pattern that appears at the next LOD level looks like crosshatched diagonals, so it appears that samples might be mirrored from where they should be or something? Its odd. I'm at work now, but trying to puzzle this out is what my mind's stuck on. There are alternate methods of stitching between chunks, but those have serious downsides and this one avoids generating fake/false geometry so I'd much rather use it despite its challenges (and the fact that I can't find any other implementations of it) [editline]edited[/editline] in other news im returning to school part-time next monday (to take base CSE classes but at least i know the instructors) and full-time next fall to work on either a math degree, an applied and computational mathematical sciences (ACMS) degree, or (if i have a complete reversal of fortunes) maybe even a double major in ACMS and CSE since I have loads of credits and was already going to have to take 3 more years anyways ACMS has a discrete math and algorithms sub-focus that seems really useful for graphics programming, and would give me as many CSE classes as I could want in case I don't get into that department.
[QUOTE=paindoc;52354369]Thanks! Do you have a lot of resources stashed for your dissertation? If there's one other thing I'm good at, it's google-fu. So I've got loads and loads of resources from a textbook all about planet/globe rendering to several interesting articles/posts about planet rendering. I've got a whole stockpile of resources about this stuff, and I wouldn't have made it nearly as far as I did without them and the work of others before me. I also got [URL="http://i.imgur.com/aPq3mLs.png"]fairly far[/URL] on this in OpenGL - if you need help doing things like an [URL="http://i.imgur.com/0wgkfli.png"]improved cubemap-to-sphere mapping for mesh generation[/URL] let me know and I can help you out with that. [/QUOTE] I have a few articles/posts saved but I always appreciate having more resources to look at! Feel free to PM me or post them here for everyone if that's not too spammy! I'm actually looking into the cubemap-to-sphere mapping now, as before I was naively using a 2D plane transformation which caused me a lot of headaches. So thank you for this, I'll go check it out now! Also good luck with the returning to school part, I actually took something similar to ACMS/CSE double major for my Undergraduate degree, or at least something similar in the UK (Maths and CS Joint Honours) and would thoroughly recommend it. I feel like the Maths helped me out tons but that could just be personal experience. Either way, go enjoy it! I'm sure you'll smash it.
[QUOTE=reevezy67;52352331]I just wrote like 5 hours of code without testing and it all just compiled and worked perfectly. I know it's terrible practice and something I should never admit in an interview, but I hate testing so I'm pretty stoked right now.[/QUOTE] You're really not alone. Especially if you're working on CRUD logic apps you can pretty much write a lot of code without ever testing it first or compiling.
If it's written in Rust it probably works as long as it compiles. [sp]good luck[/sp]
Here's something that's totally bundles of fun: debugging super hardware specific graphics bugs. As in this extremely odd bug [I]only[/I] occurs on AMD cards. In Vectoraygen one of the rendering options displays the vector field you generate as a 3D, well, field of vectors. They all have equal spacing and are scaled based on field magnitude etc its nothing too crazy. Buuut, on AMD cards the following happens: [t]https://images.discordapp.net/attachments/285116607749947392/324568555863670784/3.PNG[/t] Or, the vectors are scattered around the outside of the box. I... don't even know. I don't have AMD hardware to test on, either. I've been perusing the spec for ages, reading about AMD graphics hardware, did a big read of the graphics pipeline to try to isolate where the problem might be at, and spent a good hour perusing the vulkan hardware database to see if there's a certain feature AMD cards are missing. nada :why: [editline]15th June 2017[/editline] also, there's the lovely "hall of windows" bug on some AMD hardware too
It's interesting what you can create with a bit of noise: [url=https://www.shadertoy.com/view/lsffzs]Noise Circles[/url] [url=https://www.shadertoy.com/view/lsffzs][img]https://my.mixtape.moe/rltbkb.png[/img][/url] [url]https://www.youtube.com/watch?v=QAja2jp1VjE[/url] [url=https://www.shadertoy.com/view/4dlBRl]bonus[/url]
Just want to chime in and say this DB talk has been really interesting. I've fiddled with Mongo, and it really is nice for very quick things, but I definitely don't think I'd use it for anything production.
Congratulations to me! I broke the GLSL compiler! [code] System.Exception: 'Fragment info ------------- Internal error: assembly compile error for fragment shader at offset 917: -- error message -- line 26, column 9: error: invalid parameter array size -- internal assembly text -- !!NVfp5.0 OPTION NV_gpu_program_fp64; OPTION NV_bindless_texture; OPTION ARB_draw_buffers; # cgc version 3.4.0001, build date May 17 2017 # command line args: #vendor NVIDIA Corporation #version 3.4.0.1 COP Build Date May 17 2017 #profile gp5fp #program main #semantic MatTranslation #semantic MatRotation #semantic MatProjection #semantic Textures #var float4x4 MatTranslation : : , 4 : -1 : 0 #var float4x4 MatRotation : : , 4 : -1 : 0 #var float4x4 MatProjection : : , 4 : -1 : 0 #var ulong Textures[0][0] : : c[0] : -1 : 1 #var float3 frag_Pos : $vin.ATTR0 : ATTR0 : -1 : 1 #var float3 frag_Normal : $vin.ATTR1 : ATTR1 : -1 : 1 #var float2 frag_UV : $vin.ATTR2 : ATTR2 : -1 : 1 #var float frag_TextureID : $vin.ATTR3 : ATTR3 : -1 : 1 #var float3 out_Position : $vout.COL0 : COL0[0] : -1 : 1 #var float3 out_Normal : $vout.COL1 : COL1[1] : -1 : 1 #var float4 out_Color : $vout.COL2 : COL2[2] : -1 : 1 PARAM c[2560] = { program.local[0..2559] }; ATTRIB fragment_attrib[] = { fragment.attrib[0..3] }; TEMP R0; LONG TEMP D0; OUTPUT result_color0 = result.color; OUTPUT result_color1 = result.color[1]; OUTPUT result_color2 = result.color[2]; ROUND.F R0.x, fragment.attrib[3]; TRUNC.U R0.x, R0; MUL.S R0.x, R0, {5, 0, 0, 0}; MOV.U R0.x, R0; PK64.U D0.x, c[R0.x]; DP3.F R0.x, fragment.attrib[1], fragment.attrib[1]; TEX.F result_color2, fragment.attrib[2], handle(D0.x), 2D; RSQ.F R0.x, R0.x; MOV.F result_color0.xyz, fragment.attrib[0]; MUL.F result_color1.xyz, R0.x, fragment.attrib[1]; END # 10 instructions, 1 R-regs, 1 D-regs [/code] I mean, it was only a matter of time. 👍
Starting a fun little project. [IMG]http://i.imgur.com/P7G5g6o.png[/IMG][IMG]https://imgur.com/TwL6vFP.png[/IMG][IMG]http://i.imgur.com/yU2gdGA.png[/IMG]
VS Code is actually fabulous.
So recently the app I use for nfc payments had an update and it started detecting my phone as rooted. They probably do this so your card can't be abused by apps you falsely give root access Anyway I love living on the edge so I finally got started with hacking android apps! -snipped pictures cuz im scared- [editline]18th June 2017[/editline] Fun fact: they stripped a lot of class/variable names from their apk - for some reason isRooted and isRootDetected aren't lol
[QUOTE=LennyPenny;52372534]So recently the app I use for nfc payments had an update and it started detecting my phone as rooted. They probably do this so your card can't be abused by apps you falsely give root access Anyway I love living on the edge so I finally got started with hacking android apps! before: [t]https://dl2.pushbulletusercontent.com/u1GU0zLnY7kAI1T5mIhPlXMqJPmEsTfr/Screenshot_20170618-024322.png[/t] after: [t]https://dl2.pushbulletusercontent.com/7wG1pnSwJFeuxlokqCtTKK564iZrHFAp/Screenshot_20170618-024713.png[/t] [editline]18th June 2017[/editline] Fun fact: they stripped a lot of class/variable names from their apk - for some reason isRooted and isRootDetected aren't lol[/QUOTE] Which APK tool did you use?
Yeah it would be really useful to know how to do that, I've had similar problems in the past. Though my current phone isn't rooted.
[QUOTE=reevezy67;52373547]Yeah it would be really useful to know how to do that, I've had similar problems in the past. Though my current phone isn't rooted.[/QUOTE] You'll wanna download something called APKTool which will decompile the APK to .smali code which is like assembly but for the Dalvik environment. If you need more readability, use [URL="http://www.javadecompilers.com/apk"]http://www.javadecompilers.com/apk[/URL] to decompile the APK into Java code (although obfuscated most of the time). Then find the function that most likely provides the boolean it uses, and modify the smali and recompile using APKtool. You'll also need to sign the APK to install it back on your phone.
What I can also recommend is this [url]https://github.com/jboss-javassist/javassist[/url] It basically lets you easily replace methods with actual java code and make it spit out a new .class - which is handy when you need to do more complex thing than returning true or falso and don't want to figure out the smali code for it You just need to put that in your dex2jar'd jar again and jar2dex it (make sure you have the proper android sdk installed) [editline]18th June 2017[/editline] [QUOTE=ryankingstone;52373866]You'll wanna download something called APKTool which will decompile the APK to .smali code which is like assembly but for the Dalvik environment. If you need more readability, use [URL="http://www.javadecompilers.com/apk"]http://www.javadecompilers.com/apk[/URL] to decompile the APK into Java code (although obfuscated most of the time). Then find the function that most likely provides the boolean it uses, and modify the smali and recompile using APKtool. You'll also need to sign the APK to install it back on your phone.[/QUOTE] To make all this easier I found this awesome collection of tools [url]https://www.uret.in/topic/3398-uret-android-reverser-toolkit/[/url] But you might not trust a weird hacker group from india :v:
I got back home after being on the other side of the state for my sister's graduation and party, and started tackling the issues with my planet renderer again. A considerable amount of effort later I identified the problem. This: [cpp]sample = node.Sample(i / 2 + parent_x - 1 + (j / 2 + parent_y) * sampleGridSize);[/cpp] should be this: [cpp]sample = node.Sample(i / 2 + parent_x + (j / 2 + parent_y) * sampleGridSize);[/cpp] the difference might go unnoticed at first, but goddamnit I even [I]knew[/I] I had an off by one error somewhere but turns out this off-by-one error caused bizarre fractal artifacting besides just shifting things by one in the X. Now, though, I have some real terrain to work with: [t]http://i.imgur.com/sPvR2W9.png[/t] On to texturing, adding more detail with noise, and tuning the performance among other things. There's actually loads for me to do now, and that's pretty exciting because this silly off-by-one error was blocking my ability to progress beyond simple LOD stuff. [editline]18th June 2017[/editline] I'm glad I spent the time on this though, as Proland's scheme for propagating detail doesn't involve ugly "skirts" around terrain and doesn't involve using weird/ungainly data structures so that you can stitch things "manually" Instead, I just use a "seed" dataset for the root node that has several times the resolution of child tiles, and from there things work splendidly and simply [editline]18th June 2017[/editline] [t]http://i.imgur.com/XWmjjLj.png[/t] :thinking:
[QUOTE=PhoenixPiggy;52073734]Have decided to make a mini RTS game (1v1 command your unit type thing) as a side project from uni :). First big project for me & I've not done anything like it (ohgod & Whoooooo). Am planing on doing some networking, modeling & animations & game logic (in unity?), and am probably able / willing to spend ~6 months on it. (If 3D gets too complicated, will probably swap to 2D). Been working on the map + UI so far (using this as reference [url]http://catlikecoding.com/unity[/url]) [/QUOTE] Can confirm, decided making any form of decent 3D RTS would probably be too complicated for a first project, so decided to swap to either a multiplayer supermeat boy clone or a 2D brawler type game (with different spells and stuff); In an attempt to work on the mechanics, UI etc without getting bogged in the horrendous hexagon mesh grid system I had going on. The networking is currently a bit broken, for some reason it looks laggier on the other client, so something is broken somewhere! Also, wall jumping, because why not. [video] [url]https://www.youtube.com/watch?v=IeLc3E6JO1o&feature=youtu.be[/url] [/video]
Sorry, you need to Log In to post a reply to this thread.