tef posted:Why are you implementing DES? I'm taking a security course. There's a brief overview of crypto in the first lesson. (Brief, as crypto is its own course.) Part of our assignment is to run a few steps of DES by hand. Possibly to show us how boring and tedious it is to run by hand. But thanks for pointing out the Wikipedia material. I checked it but overlooked the important information. Jo fucked around with this message at 13:58 on Sep 11, 2009 |
|
# ? Sep 11, 2009 13:54 |
|
|
# ? May 15, 2024 01:00 |
|
Am I a knob for not using the XML libraries in Python? Whenever I need to do random XML parsing, I find it easier to just use regex rather than parse the file through the official library. I realize that this might create headaches in the future, but usually these are one-off tools to automate some sort of data mining or file renaming based on XML data.
|
# ? Sep 11, 2009 13:59 |
|
ErIog posted:Am I a knob for not using the XML libraries in Python? ErIog posted:Whenever I need to do random XML parsing, I find it easier to just use regex rather than parse the file through the official library. ErIog posted:I realize that this might create headaches in the future, but usually these are one-off tools to automate some sort of data mining or file renaming based on XML data.
|
# ? Sep 11, 2009 15:38 |
|
lxml + xpath it's good for xml
|
# ? Sep 11, 2009 16:50 |
|
ErIog posted:Am I a knob for not using the XML libraries in Python? Whenever I need to do random XML parsing, I find it easier to just use regex rather than parse the file through the official library. I realize that this might create headaches in the future, but usually these are one-off tools to automate some sort of data mining or file renaming based on XML data. As someone who has had to maintain code that parses XML using regexps (and would randomly break every time attributes moved around) I hope you someday go through the same pain.
|
# ? Sep 11, 2009 18:43 |
|
floWenoL posted:As someone who has had to maintain code that parses XML using regexps (and would randomly break every time attributes moved around) I hope you someday go through the same pain. I rewrote my code to do proper parsing using the libraries, and my code before was brain dead simple. All it did was get all the instances of certain tags, and throw the text data between the tags into a list. I never relied on the tags being in any kind of set order. I need to brush up on my Python and programming theory. I understand at a high level why using the XML library is better, but it doesn't feel like my code is any more fault tolerant. Though, this is probably because I just needed very simple things from the XML in the first place. If I were writing XML or having to do more complex things with it then obviously using the library would be better. I think the only thing this rewrite got me was readability and maintainability. Now if a tag changes, all I have to do is change one variable rather than futzing with all the string slicing magic I'm doing to get the data between tags from the regex. I guess maintainability is worth more than I give it credit for. I tend to only think about the code breaking in the future when something changes at some point. I never think that I'll have to fix it at that point. ErIog fucked around with this message at 18:59 on Sep 11, 2009 |
# ? Sep 11, 2009 18:57 |
ErIog posted:Though, this is probably because I just needed very simple things from the XML in the first place. That's how the project always starts and before you know it it will have grown into some mammoth thing that is impossible to maintain. Using the regexp may work for the really simple tasks, but the library works for both the simple tasks and the complex.
|
|
# ? Sep 11, 2009 19:36 |
|
ErIog posted:All it did was get all the instances of certain tags, and throw the text data between the tags into a list. Why is getElementsByTagName() not exactly what you just described? I am not sure how you can simplify code:
litghost fucked around with this message at 01:46 on Sep 12, 2009 |
# ? Sep 12, 2009 01:39 |
|
ErIog posted:I think the only thing this rewrite got me was readability and maintainability.
|
# ? Sep 12, 2009 02:19 |
|
litghost posted:Why is getElementsByTagName() not exactly what you just described? I am not sure how you can simplify It wasn't that I really simplified, it was that I knew how to do a regex and so I just used that rather than grab a different tool from the tool box that I would have had to look up how to use. It was just one of those things where I had a hammer(regex), and so my problem became a nail. getElementsByTagName paired with the getText function from the sample XML code is what I replaced it with. The script is on my work machine, otherwise I'd post the relevant lines. I just did a find for instances of certain tag sets, and then did a slice to get just the text data from between the tags. GrumpyDoctor posted:Don't discredit this, seriously. I personally have saved myself hours of headaches by doing things the "right way" at the beginning, and also caused myself hours of headaches by shortcutting at the beginning. I realize that, and that's what drove me to ask the question in this thread and consequently rewrite the relevant bits.
|
# ? Sep 12, 2009 03:13 |
|
ErIog posted:It wasn't that I really simplified I was refering to ErIog posted:brain dead simple which is to say, the DOM code is brain dead simple to read, whereas any regular expression would not be.
|
# ? Sep 12, 2009 04:34 |
|
litghost posted:which is to say, the DOM code is brain dead simple to read, whereas any regular expression would not be. They are equivalent, but I knew one and not the other. Therefore the one that was not new to me was perceived as being simpler. Can I make this any simpler? Does this really matter? I fixed it based upon the recommendations before you even posted your query.
|
# ? Sep 12, 2009 04:44 |
|
ErIog posted:They are equivalent As mentioned above they are not equivalent. There are any number of things that would throw off a regular expression attempt at parsing XML (newlines, attributes, unicode, encoding). quote:Does this really matter? Not in the least. You changed the code, and in the future will probably turn to existing XML libraries instead of rolling your own.
|
# ? Sep 12, 2009 05:00 |
|
litghost posted:As mentioned above they are not equivalent. There are any number of things that would throw off a regular expression attempt at parsing XML (newlines, attributes, unicode, encoding). Jesus loving christ. I was saying they were equivalent in terms of simplicity. I already loving said they weren't functionally equivalent so I obviously wouldn't have meant it that way. It was in my very first post in this thread, on this page, where I asked the question. ErIog posted:I realize that this might create headaches in the future... I might not be well-versed in Python, but I don't need a special condescending pow-wow with you where you explain things to me that I've already stated. Thanks everyone else for the simple answer to my simple question. I'll move along now. ErIog fucked around with this message at 06:37 on Sep 12, 2009 |
# ? Sep 12, 2009 06:31 |
|
is there an irc chatroom for something awful or this forum?
|
# ? Sep 12, 2009 09:51 |
|
Details in the first post of this thread: http://forums.somethingawful.com/showthread.php?threadid=2779598&userid=0&perpage=40&pagenumber=1#post340060746
|
# ? Sep 12, 2009 10:16 |
|
tef posted:Details in the first post of this thread: I have a degree in CS, but how do I get in that chatroom? I got chatzilla for firefox... not sure now.
|
# ? Sep 12, 2009 10:27 |
|
smith7800 posted:I have a degree in CS, but how do I get in that chatroom? I got chatzilla for firefox... not sure now. And people wonder why no one respects a bachelors anymore. Edit: here's a link http://lmgtfy.com/?q=how+mongo+connect+irc+with+mongo+chatzilla&l=1 yatagan fucked around with this message at 11:54 on Sep 12, 2009 |
# ? Sep 12, 2009 11:15 |
|
smith7800 posted:I have a degree in CS, but how do I get in that chatroom? I got chatzilla for firefox... not sure now. Open the ChatZilla window. In the bottom text box, enter "/attach irc.synirc.net". You should get a response indicating that you connected to the synirc network. Enter "/join #cobol". Or you could just click here.
|
# ? Sep 12, 2009 11:25 |
|
Anyone here self-taught in C# in Visual Studio? I could really do with a good tutorial site or something, but I only need to make a pretty basic form that will modify/compose a .batch file for an automated process. For the most part, it will just be tick boxes to enable calls to other processes, but I'm lost, guess I was expecting it to be more like Visual Basic.
|
# ? Sep 15, 2009 11:57 |
|
I don't do much coding so I've just been using Crimson Editor since that was recommended when I took a MIPS assembly course about 6 years ago. Any suggestions for better Windows text editor options these days?
|
# ? Sep 15, 2009 11:57 |
|
Josh Lyman posted:I don't do much coding so I've just been using Crimson Editor since that was recommended when I took a MIPS assembly course about 6 years ago. Any suggestions for better Windows text editor options these days? Probably depends on what you want but I like Notepad++ pretty good.
|
# ? Sep 15, 2009 12:02 |
|
BizarroAzrael posted:I could really do with a good tutorial site or something, but I only need to make a pretty basic form that will modify/compose a .batch file for an automated process. No tutorial site in the world will cover something that exact. quote:For the most part, it will just be tick boxes to enable calls to other processes, What does this have to do with batch files? quote:but I'm lost, guess I was expecting it to be more like Visual Basic. You have the Windows Forms designer, double-clicking on a control that you drag onto a window creates an event handler into which you write code...how much more like VB do you want? You're implying a couple types of functionality (UI, file I/O) but not saying what you're having trouble with. You're going to have to be a lot more specific. What are you looking for in C# that you could handle in VB?
|
# ? Sep 15, 2009 14:21 |
|
csammis posted:No tutorial site in the world will cover something that exact. I figured it would just be a matter of outputting lines of text into a file? Those lines will call other processes that the user requires, and the resultant batch file will be run by the Windows scheduler. I don't want anything incredibly specific, I would just like a good starting point. I can't find where I drag check boxes from, or where I tell it to make them in the form, so I can't exactly give them event handlers yet.
|
# ? Sep 15, 2009 14:51 |
|
BizarroAzrael posted:I figured it would just be a matter of outputting lines of text into a file? Those lines will call other processes that the user requires, and the resultant batch file will be run by the Windows scheduler. That isn't what you said, though. "tick boxes to enable calls to other processes" could mean a lot of things. quote:I don't want anything incredibly specific, I would just like a good starting point. I can't find where I drag check boxes from, or where I tell it to make them in the form, so I can't exactly give them event handlers yet. This is almost exactly the same as VB. Create a Windows Forms project, drag checkboxes from the Toolbox (if it's not visible, find it in the View menu). edit: http://windowsclient.net/getstarted/ csammis fucked around with this message at 16:16 on Sep 15, 2009 |
# ? Sep 15, 2009 16:11 |
|
Is there a way to specify what interface I want to use with a Python sockets connection? I've been reading the page back and forth without any luck - I'm doing some programming for a little black box that's going to have three Ethernet cards, and I have no idea how it's going to know to pick the right one to send my data on with no interface parameters in any of the config options.
|
# ? Sep 16, 2009 00:00 |
|
Necronomiconomist posted:Is there a way to specify what interface I want to use with a Python sockets connection? Are they all on the same subnet? If so, why does it matter which one you use?
|
# ? Sep 16, 2009 00:12 |
|
Two are going to be a bridge, and my app's sniffing the packets on the bridge, pulling out items of interest, and sending them to the third card, which is a standalone network.
|
# ? Sep 16, 2009 00:20 |
|
Is there a way to enable/disable a second display with vbscript or just some simple dos command? And maybe something that would minimize all windows?
|
# ? Sep 17, 2009 18:08 |
|
Not sure if this is the right place to ask, but does anyone know where the phrase `Embarrassingly parallel' was first coined, or by whom? I'm using it in a maths paper and should probably cite it somehow.
|
# ? Sep 18, 2009 19:27 |
|
DoctorTristan posted:Not sure if this is the right place to ask, but does anyone know where the phrase `Embarrassingly parallel' was first coined, or by whom? I'm using it in a maths paper and should probably cite it somehow. http://www.youtube.com/watch?v=1yH_j8-VVLo
|
# ? Sep 19, 2009 03:21 |
|
DoctorTristan posted:Not sure if this is the right place to ask, but does anyone know where the phrase `Embarrassingly parallel' was first coined, or by whom? I'm using it in a maths paper and should probably cite it somehow. Mustach fucked around with this message at 01:17 on Sep 20, 2009 |
# ? Sep 20, 2009 01:12 |
|
Mustach posted:I hope you never get published. Or get an F, whatever You do realize that that's an actual mathematical term, right?
|
# ? Sep 20, 2009 01:26 |
|
Don't care; it's the dumbest "term" ever and people should stop using it
|
# ? Sep 20, 2009 02:25 |
|
I was only going to use it in a throwaway remark at the end of an unimportant section, but now I will use it all over the drat place.
|
# ? Sep 20, 2009 03:06 |
|
This outpouring of support for the term "embarrassingly parallel" is embarrassingly parallel.
|
# ? Sep 20, 2009 08:23 |
|
Yeah, but the forum's single-threaded approach is serializing it, so we don't get any speedup.
|
# ? Sep 20, 2009 08:27 |
|
Mustach posted:Don't care; it's the dumbest "term" ever and people should stop using it Why is it dumb? It means a specific set of problems, who'se reimplementation from purely sequential to some sort of parallelism is almost trivial.
|
# ? Sep 20, 2009 18:47 |
|
"Embarrassing"'s dumb because you just used a far more accurate, appropriate, and descriptive replacement ("trivial").
|
# ? Sep 20, 2009 21:21 |
|
|
# ? May 15, 2024 01:00 |
|
Mustach posted:"Embarrassing"'s dumb because you just used a far more accurate, appropriate, and descriptive replacement ("trivial"). This is a trivial argument because we are just arguing whether using one word over another is dumb or not, when the end meaning doesn't change. I guess some newbs might get confused by "Embarrassingly Parallel" over "Trivially Parallel" but its just a convention that most people got used to already.
|
# ? Sep 20, 2009 21:29 |