00:00
00:00
Newgrounds Background Image Theme
Upgrade Your Account!

HO HO HOPE you become a Newgrounds Supporter this year!

We're working hard to give you the best site possible, but we have bills to pay and community support is vital to keep things going and growing. Thank you for considering!

Become a Supporter so NG can see another Christmas!

The Flash 'Reg' Lounge

3,086,030 Views | 60,186 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2016-03-23 18:31:56


At 3/23/16 06:26 PM, MSGhero wrote: on js to

return n > 0 ? n|0 : (n-1)|0;

That obviously doesn't deal with NaN, inf, floats bigger than MAX_SIGNED_INT, and probably other things. But yeah, 20x faster than Math.floor. But it's not nearly as dramatic of a speedup on the other targets, 2x faster on flash, a little bit on cpp, and worse on neko for some ghastly reason.

That clever version using just bitshifts in my edit will most likely be faster than that. (And might even be a bit faster with the redundant > 0 at the end removed, which, so far as I can tell, is just there to make the result an actual boolean for true cases.)

But, at the end of the day: it's JavaScript. If you need that kind of performance, you're writing the wrong language.

Response to The Flash 'Reg' Lounge 2016-03-23 19:32:45 (edited 2016-03-23 19:33:19)


At 3/23/16 06:31 PM, Diki wrote:
That clever version using just bitshifts in my edit will most likely be faster than that. (And might even be a bit faster with the redundant > 0 at the end removed, which, so far as I can tell, is just there to make the result an actual boolean for true cases.)

What the hell was that. Requiring 3 things instead of just doing the math?

In haxe, the stuff to the left of >> has to be typed as an int, so n >> 0 doesn't do anything. The cool thing is that the static analyzer would just remove the >> 0 (build, and check js export).

But, at the end of the day: it's JavaScript. If you need that kind of performance, you're writing the wrong language.

Well, for me it's haxe, which is every language :)

Response to The Flash 'Reg' Lounge 2016-03-23 19:41:27


At 3/23/16 07:32 PM, MSGhero wrote: What the hell was that. Requiring 3 things instead of just doing the math?

It's technically doing more, but bitshifting is incredibly fast.

At 3/23/16 07:32 PM, MSGhero wrote: In haxe, the stuff to the left of >> has to be typed as an int, so n >> 0 doesn't do anything. The cool thing is that the static analyzer would just remove the >> 0 (build, and check js export).

It's good that Haxe does that, but that code was written for JS, and JS is very fucking goofy; if you're writing in a goofy language, may as well do goofy things.

At 3/23/16 07:32 PM, MSGhero wrote: Well, for me it's haxe, which is every language :)

Well, if you compile it to JS and need speed, then you're compiling to the wrong language. :)

Response to The Flash 'Reg' Lounge 2016-03-23 20:06:50


At 3/23/16 07:41 PM, Diki wrote: Well, if you compile it to JS and need speed, then you're compiling to the wrong language. :)

Or CPP export is broken on master, and you need features/fixes that were added after the previous master.

inheriting multiple interfaces is a compile error in CPP

I have no need for native builds right now, but hopefully a new master gets released soon. Otherwise, I'll have to venture into dev-land. Not bad in general, but I don't keep up with haxe enough to know if the current dev build is awful or not. Like, they made switch statements more consistent internally, but it was a massive breaking change, and there was no mention of it except a single inline comment in the commit.

and every library's travis build failing with dev haxe

Response to The Flash 'Reg' Lounge 2016-03-23 20:18:37


At 3/23/16 08:06 PM, MSGhero wrote:
inheriting multiple interfaces is a compile error in CPP

https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-23 20:27:55


At 3/23/16 08:18 PM, egg82 wrote:
At 3/23/16 08:06 PM, MSGhero wrote:
inheriting multiple interfaces is a compile error in CPP
https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem

No, like implementing two distinct, unrelated interfaces causes an error when building. That was fixed on dev, but then they broke having multiple build macros (haxe feature), then they broke other stuff on CPP. So I'm just chilling with flash export on my old haxe version.

Response to The Flash 'Reg' Lounge 2016-03-23 21:41:46 (edited 2016-03-23 21:42:57)


At 3/23/16 08:06 PM, MSGhero wrote: Or CPP export is broken on master, and you need features/fixes that were added after the previous master.
inheriting multiple interfaces is a compile error in CPP

I just write actual C++ so I don't have to deal with that. :)

edit:

At 3/23/16 08:06 PM, MSGhero wrote:
inheriting multiple interfaces is a compile error in CPP

Not if you write C++. ;)

Response to The Flash 'Reg' Lounge 2016-03-23 23:00:46


At 3/23/16 09:41 PM, Diki wrote: Not if you write C++. ;)

I'm not looking for a job in CS, but if I have to have one, I really hope the language they use is supported by haxe. I could just be like "Yeah, I'm fluent in JS, and I'm the one who wrote this code, me a human, not a computer. Yes, I know C++ too, sorry I tend to use g1, g2, etc as my local variable names."

Response to The Flash 'Reg' Lounge 2016-03-23 23:11:14


At 3/23/16 11:00 PM, MSGhero wrote: I'm not looking for a job in CS, but if I have to have one, I really hope the language they use is supported by haxe.

Does haxe even support a way to use C++ libraries that were written in raw C++ and not haxe? Like, is there a feasible way to use something like Boost or SMFL with haxe without having to do a bunch of hacky stuff?

I'm not about to stop writing actual C++ or anything; just curious about how haxe works.

Response to The Flash 'Reg' Lounge 2016-03-24 00:06:29


At 3/23/16 11:11 PM, Diki wrote: I'm not about to stop writing actual C++ or anything; just curious about how haxe works.

Me, too. I've been seriously considering using/learning Haxe (since it's really not much different from AS3, that actually makes it harder to learn for me because I'm liable to get very confused during the transition)

I'm just not sure how it'll affect my workflow and how the whole "black magic" part of it works (on a basic level, at least)

I still like using C# for desktop apps because, well fuck, it's C#. But if I can port my framework to/develop desktop games with Haxe I might do that.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-24 01:24:57 (edited 2016-03-24 01:28:39)


At 3/24/16 12:06 AM, egg82 wrote:
At 3/23/16 11:11 PM, Diki wrote: I'm not about to stop writing actual C++ or anything; just curious about how haxe works.

I don't understand it much, but yes. You can inject raw C++ directly into your haxe code which shows up in the output, and you can load raw C++ libs in. There is a load/save file dialog thing written in C++ , and you conditionally compile to include the Win/Mac/Lin versions or to use flash's FileReference class or whatever. Better would be to hide the conditional parts in some abstract class so you can use a common API on each platform. That's basically what the gamedev haxe libraries do.

There's a set of libs that provide native bindings to OpenGL, SDL, iCloud, etc. Not sure about boost, I don't see anyone using it.

I'm just not sure how it'll affect my workflow and how the whole "black magic" part of it works (on a basic level, at least)

I construct a map at compile time of everything in my json directory, but parsed to Dynamic ahead of time and inject it as a variable. Also, remember a while ago when I had to manually embed like 300 assets into my flash project? Haxe does this automatically at compile time using the same method. That might be Black Magic 2001, and there's some upperclassmen-level shit when you move away from the (easy) compile-time macros.

Response to The Flash 'Reg' Lounge 2016-03-24 14:36:37


At 3/23/16 09:41 PM, Diki wrote: Not if you write C++. ;)

My final project at uni is partially in C++ and oh my god. I don't necessarily think it's bad, I'm just bad at it. And the standard lib leaves a lot to be desired; I find myself implementing a lot of boring functions. Maybe it's the contrast between working in Python one minute and C++ the next that's bringing out the negativity.

I suppose that's what I get for not using boost.

Response to The Flash 'Reg' Lounge 2016-03-24 15:03:29


At 3/24/16 02:36 PM, Sam wrote: I suppose that's what I get for not using haxe.

Fixed.

Response to The Flash 'Reg' Lounge 2016-03-24 16:00:28


At 3/24/16 02:36 PM, Sam wrote:
At 3/23/16 09:41 PM, Diki wrote: Not if you write C++. ;)
My final project at uni is partially in C++ and oh my god. I don't necessarily think it's bad, I'm just bad at it. And the standard lib leaves a lot to be desired; I find myself implementing a lot of boring functions. Maybe it's the contrast between working in Python one minute and C++ the next that's bringing out the negativity.

I suppose that's what I get for not using boost.

The standard library is pretty robust, especially with C++11. What functions did you have to write to do things that aren't available in the STL?

Response to The Flash 'Reg' Lounge 2016-03-24 18:15:14


I finally decided to write an article on the whole ransomware thing.

The irony of putting ads on that page is not lost on me.

Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-26 05:04:25


And now, out of boredom, I've re-written my Pi PRNG program.
It's a ton faster and cleaner. Only needed three classes for it. Entropy isn't quite as good as the first one, but it's pretty damn close for being at least 10x more efficient.

C# Source


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-28 16:33:24


I need this in my life :D


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-28 16:39:30


At 3/28/16 04:33 PM, egg82 wrote: I need this in my life :D

That's hilarious, and if I used the console for more than haxe stuff, I would totally use that.

Response to The Flash 'Reg' Lounge 2016-03-28 18:03:47


At 3/28/16 04:33 PM, egg82 wrote: I need this in my life :D

But happens if you accidentally type fick?

Response to The Flash 'Reg' Lounge 2016-03-28 22:05:28


At 3/28/16 06:03 PM, Diki wrote: But happens if you accidentally type fick?

I believe it just deletes your entire filesystem because you can't even spell "fuck" correctly and thus don't deserve to be under Linux's guiding light :P


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-28 23:11:05


At 3/28/16 10:05 PM, egg82 wrote: I believe it just deletes your entire filesystem because you can't even spell "fuck" correctly and thus don't deserve to be under Linux's guiding light :P

I was looking for a package in the repositories under "fick" but didn't find anything. That's the best I got :(


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-29 01:07:45 (edited 2016-03-29 01:16:38)


This absolutely blew my mind. This is perfect for things like gov't jobs that usually require two separate computers on two distinct networks. Also for malware analysis and package/application development/testing.
It even runs Windows because fuck you that's why.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-31 09:35:08


Ooooh shiiit. I think I can just about retire with the bucks I'm raking in from a shitty game I made twelve years ago:

The Flash 'Reg' Lounge

Response to The Flash 'Reg' Lounge 2016-03-31 12:22:09


At 3/31/16 09:35 AM, Diki wrote: Ooooh shiiit. I think I can just about retire with the bucks I'm raking in from a shitty game I made twelve years ago:

I created my YT channel about three years ago and I've made ~$15 from it so far.
Woo, rich!


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-03-31 13:09:40


Oh, good. Now there's a quick and entertaining video on how video games are made.
(Actually the video is pretty damn good. I might start referencing it here on the forums)


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-04-01 00:10:20 (edited 2016-04-01 00:10:46)


I don't understand viruses/malware that intentionally destroys your computer. Wouldn't it be better to remain unnoticed and simply do data mining/keylogging for personal accounts and information potentially for years until the computer is retired?

I dunno. Just my two cents.

Maybe some people just want to watch the world burn

Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-04-01 01:34:35


What the fuck is this website

Response to The Flash 'Reg' Lounge 2016-04-01 01:37:18


At 4/1/16 01:34 AM, MSGhero wrote: What the fuck is this website

Apparently my personal blog where I talk to myself.

Nobody loves me :(

(Or maybe it's just that I don't have much in the way of helpful things to say. That could be it.)

.. Or are you talking about the slot machine at the top of the page which I just discovered upon writing this reply?
I like it.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-04-01 05:17:30 (edited 2016-04-01 05:20:03)


Okay. Three things I've learned tonight:

1. "sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get -y upgrade" gives you a completely hosed system.
2. Disabling the root account and running "sudo usermod -G www-data user" on your ONLY user also gives you a hosed system.
3. Re-installing Debian-based OSes with encrypted filesystems at 3 AM sucks and you make a lot of mistakes.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2016-04-01 09:08:47


At 4/1/16 05:17 AM, egg82 wrote: Okay. Three things I've learned tonight:

1. "sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get -y upgrade" gives you a completely hosed system.
2. Disabling the root account and running "sudo usermod -G www-data user" on your ONLY user also gives you a hosed system.
3. Re-installing Debian-based OSes with encrypted filesystems at 3 AM sucks and you make a lot of mistakes.

I literally ran "sudo chmod -R o-rwx /" yesterday and hadn't setup a root password.

> sudo helppls /bin/sh Permission denied.

I'm good at Linux.