Be a Supporter!

Programming Regs Lounge

  • 494,400 Views
  • 16,819 Replies
New Topic Respond to this Topic
doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-04 06:29:25 Reply

Well, Murphy, I hope it won't get worse...

And I discovered something in Python.

name = 'Dean O'\Bryan'
print(name)

And it will output this:

Dean O'Bryan

There are no errors, thanks to the "\".


At least not a muffin.

BBS Signature
Jessii
Jessii
  • Member since: Feb. 10, 2005
  • Offline.
Forum Stats
Member
Level 36
Movie Buff
Response to Programming Regs Lounge 2012-08-04 09:40:33 Reply

At 8/4/12 06:04 AM, PMMurphy wrote: Its not really at a severe stage. But just the meer fact of it not going away is scary. Their is no current conditions right now that can provoke this manic episode. So its just really scary the fact its not going away.

Here's a thought have your thyroid checked. If that's out of whack, it could make the mania worse. It's hard to tell online through a thread post but your typing is relatively organized and if you were THAT bad, you wouldn't really be making much sense. However, you know yourself so it's definitely a good thing for you to see the dr and if you really have to, I recommend going to the ER.

If you're seriously thinking that you can hurt someone (or being a troll, at this point I can't tell and would take it seriously anyway because given what happened in Colorado...), definitely go to the ER if you can't see your dr.

If the dr taught you any relaxation techniques, use them. Go for a walk/run if you have to. Just do something that would focus the attention away from the episode.

If you're just being an idiot and saying just saying stuff for attention, I suggest you stop right now. This is not the place to do something like that.

Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Programming Regs Lounge 2012-08-04 10:49:14 Reply

At 8/4/12 06:29 AM, doodle-bread14 wrote: name = 'Dean O'\Bryan'
print(name)

Stuff like that is why I always use double quotes for my strings; you don't need to escape apostrophes:

name = "Dean O'Bryan"
print(name)

That and I'm just used to C-style strings from writing so much C++.
And, yeah, as citricsquid pointed out: that's just plain old escaping; even PHP can do that.

Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Programming Regs Lounge 2012-08-04 10:53:24 Reply

At 8/4/12 04:24 AM, doodle-bread14 wrote: I hope it will the combination of the three... I don't know yet.

Sounds like a good idea; that's what Lua did and it's a fantastic language.

At 8/4/12 04:24 AM, doodle-bread14 wrote: Sub-routines? You mean, classes?

No.
A sub-routine is like a function or a lambda; a block of code that can be executed multiple times elsewhere in the program.

Also: are you going to go with classical or prototypal inheritance? That's something I would have a tough time deciding on; they both have pros and cons (though I think ultimately I would go with classical).

doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-04 11:20:24 Reply

At 8/4/12 10:53 AM, Diki wrote: Sounds like a good idea; that's what Lua did and it's a fantastic language.

Well then I hope I will do it too.

No.
A sub-routine is like a function or a lambda; a block of code that can be executed multiple times elsewhere in the program.

There will be sub-routines, although they need to be marked.

Also: are you going to go with classical or prototypal inheritance? That's something I would have a tough time deciding on; they both have pros and cons (though I think ultimately I would go with classical).

Prototypal - for the start.


At least not a muffin.

BBS Signature
NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-04 14:08:35 Reply

At 8/4/12 09:40 AM, Jessii wrote: stuff

What the man said. Run, and/or use sedatives.

Jessii
Jessii
  • Member since: Feb. 10, 2005
  • Offline.
Forum Stats
Member
Level 36
Movie Buff
Response to Programming Regs Lounge 2012-08-04 19:45:05 Reply

At 8/4/12 02:08 PM, NinoGrounds wrote:
At 8/4/12 09:40 AM, Jessii wrote: stuff
What the man said. Run, and/or use sedatives.

Man? Who? Me? I'm not a big supporter of benzos unless they're supervised very carefully by the treating physician.

PMMurphy
PMMurphy
  • Member since: May. 27, 2012
  • Offline.
Forum Stats
Member
Level 01
Artist
Response to Programming Regs Lounge 2012-08-04 21:20:47 Reply

At 8/4/12 09:40 AM, Jessii wrote: Here's a thought have your thyroid checked. If that's out of whack, it could make the mania worse. It's hard to tell online through a thread post but your typing is relatively organized and if you were THAT bad, you wouldn't really be making much sense. However, you know yourself so it's definitely a good thing for you to see the dr and if you really have to, I recommend going to the ER.

My thyroid gets checked every 2 months. Also people with psychosis can still function and create coherent thoughts and patterns. It is when we are in a deep psychosis when things really start to get fucked up. I was not expierencing a psychosis but rather just the preliminary stages into psychosis.

It is a noramal thing to experience those things with my illness so it is not emergency worthy. But thanks for the comments.-

NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-05 05:56:09 Reply

i lol'd

Programming Regs Lounge

Jessii
Jessii
  • Member since: Feb. 10, 2005
  • Offline.
Forum Stats
Member
Level 36
Movie Buff
Response to Programming Regs Lounge 2012-08-05 08:48:29 Reply

At 8/4/12 09:20 PM, PMMurphy wrote: It is a noramal thing to experience those things with my illness so it is not emergency worthy. But thanks for the comments.-

Yes, I know it's possible to have coherent thoughts during a manic episode but it doesn't usually happen because your brain is in overdrive. However, you coming into a public forum expressing what you did is not the best thing to do, especially when you're expressing potentially homicidal thoughts. If you're having thoughts like that, it really is best to seek support from friends/family/therapist, etc. rather than expressing it online where you might not get the right support (unless it's a specific forum for that type of thing).

doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-05 10:27:49 Reply

At 8/5/12 05:56 AM, NinoGrounds wrote: i lol'd

Why did you lol'd?


At least not a muffin.

BBS Signature
Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Programming Regs Lounge 2012-08-05 12:30:33 Reply

At 8/5/12 10:27 AM, doodle-bread14 wrote: Why did you lol'd?

Yeah it's just Google showing your geographical location because your search query was pretty much just the word "position" (if you remove the ellipse and brackets you'll get the same result).
At first I thought Google had your location wrong and you don't live in Pula, but your Newgrounds profile says you're from Croatia, so I dunno.

doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-05 13:38:21 Reply

At 8/5/12 12:30 PM, Diki wrote: At first I thought Google had your location wrong and you don't live in Pula, but your Newgrounds profile says you're from Croatia, so I dunno.

Maybe he leaved his phone in Pula, so...


At least not a muffin.

BBS Signature
kiwi-kiwi
kiwi-kiwi
  • Member since: Mar. 6, 2009
  • Offline.
Forum Stats
Member
Level 09
Programmer
Response to Programming Regs Lounge 2012-08-05 14:16:57 Reply

At 8/5/12 10:27 AM, doodle-bread14 wrote:
At 8/5/12 05:56 AM, NinoGrounds wrote: i lol'd
Why did you lol'd?

I don't know why he lol'd, I did because that word translates to a whole bunch of stuff from other languages if you look on google translate.
This being the most interesting of course

doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-05 14:33:58 Reply

At 8/5/12 02:16 PM, kiwi-kiwi wrote: This being the most interesting of course

Lol! Cockjoke!


At least not a muffin.

BBS Signature
PMMurphy
PMMurphy
  • Member since: May. 27, 2012
  • Offline.
Forum Stats
Member
Level 01
Artist
Response to Programming Regs Lounge 2012-08-05 16:01:12 Reply

At 8/5/12 08:48 AM, Jessii wrote: Yes, I know it's possible to have coherent thoughts during a manic episode but it doesn't usually happen because your brain is in overdrive.

Hey man, i don't mean to take this in the wrong direction or anything. But one of my previous threads related to this topic got locked because the mod thought i was a self-absorbed attention whoring prick. So i think it would be best suited to discuss this in private messages and not on a thread where it can be viewed as me dodging mods.

Also, i shouldn't of even posted what i did where it is. So if you want to discuss further go ahead and do it there.

Thegluestickman
Thegluestickman
  • Member since: Mar. 16, 2007
  • Offline.
Forum Stats
Member
Level 13
Game Developer
Response to Programming Regs Lounge 2012-08-05 22:45:11 Reply

I have to say, now that I've been using Linux for the past couple days it has grown on me. I love being able to compile code right from terminal, and I love being able to download and install my programs at the same time. The only thing that sucks is almost all the programs and games aren't supported, but that is why dual-booting is the way to go.

I'm liking this.


To protect the world from devastation.
kidd25 is the best Newgrounder ever.

BBS Signature
NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-06 22:21:03 Reply

At 8/5/12 10:45 PM, Thegluestickman wrote: I'm liking this.

I liek unix too. I started with ubuntu, now I'm using backtrack 5 r2

Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Programming Regs Lounge 2012-08-10 12:17:18 Reply

jQuery 1.8 has been released, and adds some pretty awesome features, such as:

Automatic CSS prefixing: When you use a CSS property, in either .css() or .animate(), weĆ¢EUTMll use the correct prefixed property (when appropriate) for that browser. For example, take .css("user-select", "none"); in Chrome/Safari weĆ¢EUTMll set the value as "-webkit-user-select", Firefox will use "-moz-user-select", and IE10 will use "-ms-user-select".
doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-10 12:30:06 Reply

At 8/10/12 12:17 PM, Diki wrote: jQuery 1.8 has been released, and adds some pretty awesome features, such as:

I'm not sure what jQuery is, but I suppose it's used for web developing and stuff.


At least not a muffin.

BBS Signature
Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Programming Regs Lounge 2012-08-10 14:45:12 Reply

At 8/10/12 12:30 PM, doodle-bread14 wrote: I'm not sure what jQuery is, but I suppose it's used for web developing and stuff.

It's a JavaScript framework that, among other things, simplifies working with the DOM as well as performing AJAX-based requests.
Here's an example of jQuery that performs an AJAX request and stores the response in an HTML element:

jQuery(document).ready(function($){
  $.ajax({
    url: "myPage.html",
    success: function(response){
      $("#myElement").html(response);
    }
  });
});

It's very intuitive and straight-forward.

doodle-bread14
doodle-bread14
  • Member since: Jul. 25, 2012
  • Offline.
Forum Stats
Member
Level 04
Programmer
Response to Programming Regs Lounge 2012-08-10 14:54:12 Reply

Good at explaining as always, Tyler!


At least not a muffin.

BBS Signature
NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-13 15:58:10 Reply

Nothing interesting this days around here. And nothing interesting in my dev world either, I'm just playing SWTOR like crazy

kiwi-kiwi
kiwi-kiwi
  • Member since: Mar. 6, 2009
  • Offline.
Forum Stats
Member
Level 09
Programmer
Response to Programming Regs Lounge 2012-08-13 16:11:47 Reply

At 8/13/12 03:58 PM, NinoGrounds wrote: Nothing interesting this days around here. And nothing interesting in my dev world either, I'm just playing SWTOR like crazy

I'm playing diablo2
which is actually a bit awkward since I got it from buying diablo 3

Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Programming Regs Lounge 2012-08-13 16:42:58 Reply

At 8/13/12 03:58 PM, NinoGrounds wrote: Nothing interesting this days around here.

I'm working on something that (in my opinion) is pretty interesting. :)
It's a web server written in Python, based on Flask.

This is an example implementation:

from sys import argv
from spiderweb import Spiderweb, Template

httpd = Spiderweb(argv[1])
template = Template("site/templates")

@httpd.route("/", "/index")
def index():
    return "hello world"

httpd.start()

That will return the text "hello world" to the following URIs:
http://www.yourdomain.com/
http://www.yourdomain.com/index

As they are defined as routes using the httpd.route function decorator.
You can also use regular expressions for your routes:

@httpd.route(r/[/][0-9]+/)
def numericFodlder():
    return "Viewing a numeric folder!"

That will match URIs such as:
http://www.yourdomain.com/1
http://www.yourdomain.com/42
http://www.yourdomain.com/18586

It's still very premature, but progress is being made.

Current source code is available here:
Main.py
Routing.py
Templates.py

NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-14 13:25:38 Reply

At 8/13/12 06:12 PM, citricsquid wrote: contributing to the shit we wrote:

I remade my personal website: http://samryan.co.uk

I'm also hoping to remake my personal site (just the index, tho) when I go to college this fall.

I remade http://httpstatus.es using a cool mini-framework called klein and then open sourced it: https://github.com/citricsquid/httpstatus.es

It's looking really cool. Nice job there

NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-14 16:28:49 Reply

At 8/13/12 04:42 PM, Diki wrote:
At 8/13/12 03:58 PM, NinoGrounds wrote: Nothing interesting this days around here.
I'm working on something that (in my opinion) is pretty interesting. :)
It's a web server written in Python, based on Flask.

Don't you ever go swimming? It's summer, ya know

At 8/13/12 04:11 PM, kiwi-kiwi wrote: I'm playing diablo2
which is actually a bit awkward since I got it from buying diablo 3

I lol'd. From wiki: Diablo III subsequently set the new all-time record for fastest-selling PC game by selling over 3.5 million copies in the first 24 hours of its release.

Also, wikileaks is no longer under DDoS

Jon-86
Jon-86
  • Member since: Jan. 30, 2007
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to Programming Regs Lounge 2012-08-14 17:04:04 Reply

I had a productive day. I finished off the working face of the thing. The other guy finished off the working skeleton. We stitched that thing together and the monster started walking. Now we just need to polish it a wee but and start working on the guts. Our beast is alive :D

First time in a while a plan has actually paid off and two separate phases of development merged seamlessly and were checked into the trunk. It made me happy!


PHP Main :: C++ Main :: Java Main :: Vorsprung durch Technik
irc.freenode.net #ngprogramming

BBS Signature
NinoGrounds
NinoGrounds
  • Member since: Nov. 28, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to Programming Regs Lounge 2012-08-14 17:06:21 Reply

At 8/14/12 05:04 PM, Jon-86 wrote: I had a productive day. It made me happy!

Flash?

Jon-86
Jon-86
  • Member since: Jan. 30, 2007
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to Programming Regs Lounge 2012-08-14 17:12:26 Reply

At 8/14/12 05:06 PM, NinoGrounds wrote:
At 8/14/12 05:04 PM, Jon-86 wrote: I had a productive day. It made me happy!
Flash?

Nah a scientific toolset written in python. Tis the day job. My own projects are still pretty much simple web apps because I don't get time for anything else. I haven't touched flash in years.

But its good when you steam right through something you thought would take longer. Not only dose that take the pressure off when it comes to deadlines and timelines etc but we also have something to show for it! And we've got something re-useable.

Good day all round to be honest!


PHP Main :: C++ Main :: Java Main :: Vorsprung durch Technik
irc.freenode.net #ngprogramming

BBS Signature