|
Newf posted:When people say 'scripting', does this universally refer to code that is run client side? Web pages can have js which is run client side (eg, <script type="text/javascript"> ... </>), and that js may be internal to the page or from a linked file (which the browser DLs and executes). Is there a sharp divide between what are and are not scripting languages? There must be a per-browser list of languages which are client side 'runnable' (eg, I'm sure there is no way for me to have a client-side browser run a matlab.m script directly, but where do I get comprehensive info about this?). Do servers run code that's written in scripting languages? Or do they typically do their thing in languages which require, for example, more specified software environments (eg JVM)? Javascript is probably not the best example because it's "runnable" server side, runs code written server side and spits out HTML or something else (any protocol really)?
|
# ? Apr 18, 2012 15:21 |
|
|
# ? Jun 9, 2024 03:40 |
|
Does anybody have any experience with Business Object Notation? I read this article and it seems to praise it highly, and I must admit the simplicity and rigor of its basics expounded here make it seem pretty compelling. It seems easy enough to be able to mock out in a Google Doc but if there were some dedicated online tools that someone knew of that would be even cooler.
|
# ? Apr 18, 2012 16:06 |
|
Rocko Bonaparte posted:Wow somebody did respond after all. For the curious, I was going to post something I actually found through Reddit: See also FrTime for scheme and Flapjax for Javascript
|
# ? Apr 18, 2012 19:55 |
|
Fren posted:Does anybody have any experience with Business Object Notation? I read this article and it seems to praise it highly, and I must admit the simplicity and rigor of its basics expounded here make it seem pretty compelling. It seems easy enough to be able to mock out in a Google Doc but if there were some dedicated online tools that someone knew of that would be even cooler. It looks like visual programming, except without a compiler.
|
# ? Apr 18, 2012 19:57 |
|
Fren posted:Does anybody have any experience with Business Object Notation? I read this article and it seems to praise it highly, and I must admit the simplicity and rigor of its basics expounded here make it seem pretty compelling. It seems easy enough to be able to mock out in a Google Doc but if there were some dedicated online tools that someone knew of that would be even cooler. (I've never used BON or know of anyone that has so that's all I can say!)
|
# ? Apr 18, 2012 21:17 |
|
Carrying this over here by request of a mod. If you can help me out that'd be great, guys! Blackclaw posted:Hi guys!
|
# ? Apr 18, 2012 23:35 |
|
Blackclaw posted:Carrying this over here by request of a mod. If you can help me out that'd be great, guys! Hah, I didn't realize I was a mod! I'm not very observant sometimes...
|
# ? Apr 19, 2012 02:47 |
|
Thermopyle posted:Hah, I didn't realize I was a mod! I'm not very observant sometimes... Upon closer inspection, I realise now that you're not a mod of this forum. So I'm not very observant sometimes either. You're right in that this is probably a better place to find help, though...
|
# ? Apr 19, 2012 03:10 |
|
Is there any standard or commonly used format for defining a formal grammar?
|
# ? Apr 19, 2012 03:37 |
|
peepsalot posted:Is there any standard or commonly used format for defining a formal grammar? Backus-Naur.
|
# ? Apr 19, 2012 03:50 |
|
peepsalot posted:Is there any standard or commonly used format for defining a formal grammar? http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form - weak sauce, very little expressive power http://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_Form - stronger http://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form - very strong, slightly odd syntax. Includes some odd features like "special sequences" and "exceptions", which make it possible to express non-context-free grammars http://en.wikipedia.org/wiki/Wirth_syntax_notation - gross http://en.wikipedia.org/wiki/Definite_clause_grammar http://en.wikipedia.org/wiki/Syntax_diagram - better known as a "railroad diagram". I particularly like how Wikipedia's example diagrams use hard right angles which make it unclear which directions you're allowed to go in, unlike e.g. http://json.org None of these formats are perfect. Many of the examples are incomplete. One day I may make a notation which actually looks like an extension of standard regex syntax, e.g. using {2,3}, ? and + for multipliers, [^abc] for character classes.
|
# ? Apr 19, 2012 11:10 |
|
qntm posted:None of these formats are perfect. Many of the examples are incomplete. One day I may make a notation which actually looks like an extension of standard regex syntax, e.g. using {2,3}, ? and + for multipliers, [^abc] for character classes. Kind of like Parsing Expression Grammars?
|
# ? Apr 19, 2012 14:31 |
|
ToxicFrog posted:Kind of like Parsing Expression Grammars? PEGs are a parsing technique, not a syntax. You can define a PEG in EBNF or Wirth if you wanted to.
|
# ? Apr 19, 2012 16:16 |
|
I guess this is as good a place as any to put this. I don't actually know much about visual basic, and I needed a way to split a large excel file with Committee Assignments for people up into a different sheet for each committee. With some google-ing and guess and checking on the code I came up with this: http://pastebin.com/HTbdweXW The only problem is that every time I want to use it, I need to make a copy of the sheet I want to run it on with just values, since it doesn't seem to like the references and equations that make up most of the sheet. Is there a way to make this macro work with just the values? Also is there a way to do Office Macros in C#? because that would be swell.
|
# ? Apr 19, 2012 17:30 |
|
using Microsoft.Office.Interop.Excel;
|
# ? Apr 19, 2012 17:41 |
|
pokeyman posted:using Microsoft.Office.Interop.Excel; That's helpful, but AFAICT it doesn't let me make macros that work from the xls file itself, that just lets me work with excel files in C#.
|
# ? Apr 19, 2012 17:48 |
|
Oh, I thought you wanted to use something instead of a macro. Sorry.
|
# ? Apr 19, 2012 17:51 |
|
pokeyman posted:Oh, I thought you wanted to use something instead of a macro. Sorry. Sadly I kind of need a macro for this one. Thanks for mentioning that using though. I had also been looking for a way to work with excel files in C# for an unrelated project.
|
# ? Apr 19, 2012 17:52 |
|
Suspicious Dish posted:PEGs are a parsing technique, not a syntax. You can define a PEG in EBNF or Wirth if you wanted to. PEGs are not a parsing technique any more than context free grammars are; they are a type of formal grammar and the paper describing them also describes a syntax for expressing them (using PEG syntax itself for the description, even). You may be thinking of packrat parsers, which are commonly used to parse languages described by PEGs.
|
# ? Apr 19, 2012 18:20 |
|
I feel defeated for having to ask this. I have a recursive timer function in javacript which works just fine when called once; I want to have a loop which will include a call to the timer function and shouldn't continue until that has completed - javascript doesn't give a gently caress that I want that to happen. This works when you call it out of a loop: code:
code:
Please can someone point out my obvious mistake?
|
# ? Apr 19, 2012 21:50 |
|
Your code is architected wrong. setTimeout won't work in a loop like that, it's not how it works. setTimeout(F, T) calls F after T milliseconds have elapsed. It will not pause execution of your program.
|
# ? Apr 19, 2012 22:02 |
|
Red_Mage posted:I guess this is as good a place as any to put this. I don't actually know much about visual basic, and I needed a way to split a large excel file with Committee Assignments for people up into a different sheet for each committee. Try instr(cell.Value,findWhat) or Value2, rather than text. The instr is possibly comparing findWhat to the cell's containing formula rather than its value. You can minimize your code by putting your findWhat values into an array and for looping the size of that. Take note of the trim function when you copy to a named sheet. code:
|
# ? Apr 19, 2012 22:06 |
|
Suspicious Dish posted:Your code is architected wrong. setTimeout won't work in a loop like that, it's not how it works. setTimeout(F, T) calls F after T milliseconds have elapsed. It will not pause execution of your program. Thanks, I added a wait function (from a google hit) and changed my do a bit, but the performance is poo poo. code:
|
# ? Apr 19, 2012 22:32 |
|
gwar3k1 posted:Thanks, I added a wait function (from a google hit) and changed my do a bit, but the performance is poo poo. I am not sure you understand how setting timeouts works. If you want to set something up to happen in 5 seconds, say, then you create a timeout using setTimeout (specifying a time of 5000 milliseconds) and then you allow your function (the function in which you used setTimeout) to run to completion. When the timeout has run its course, your function will get called, spontaneously, by the JavaScript engine. If you want a nice-looking, smooth animation on the other hand, I think it's easiest to use what jQuery offers you. I made this thing last year for an event I was involved in, it is more complex than is needed for an example but you might find it interesting to look at.
|
# ? Apr 19, 2012 23:08 |
|
Hoping this is the right place to ask this, Would anyone mind sharing their opinions on what the most important/best Computer Science classes would be? I've mostly heard Compilers, Computer Graphics, Operating Systems, Data Structures, Algorithms, and Databases. Thanks,
|
# ? Apr 19, 2012 23:37 |
|
gwar3k1 posted:Try instr(cell.Value,findWhat) or Value2, rather than text. The instr is possibly comparing findWhat to the cell's containing formula rather than its value. Thanks for the help, I fixed your arrays to match syntax and tried your code and well... it was a fiasco, something botched horribly. Just gonna stick with my copy paste data workaround.
|
# ? Apr 19, 2012 23:50 |
|
.
maskenfreiheit fucked around with this message at 21:29 on Apr 28, 2019 |
# ? Apr 20, 2012 00:46 |
|
.
maskenfreiheit fucked around with this message at 21:29 on Apr 28, 2019 |
# ? Apr 20, 2012 00:47 |
|
GregNorc posted:How could I write a bash script to append something to every file in a directory? I have a large number of files I need to append to, and doing it manually will take a really long time... code:
|
# ? Apr 20, 2012 01:07 |
|
Rello: Discrete Mathematics.
|
# ? Apr 20, 2012 01:17 |
|
Got a crypto question. I'm interested in doing digital signature for the purpose of verified firmware updates on an embedded device. So the firmware updates will come from single source (me), and the embedded device would contain my signature's public key in it's existing firmware. I know that typically a signature is done by making a hash of the message and then signing that hash, but for my case I would much rather sign the entire message if at all possible. I would just like to discourage the reading/disassembly of the firmware by having sending out plaintext firmware updates(I realize if they have physical access to the device they could hypothetically read the data from the chip by driving pins with external circuitry or whatever, this is just an small added deterrent that I would like to have). So are there appropriate algorithms for doing such a thing? I've been told that some digital signature algorithms have a limited signature length? From what I've read so far it sounds like some form of Elliptic Curve algorithm is the way to go. I'm not planning on rolling my own because I know I'm not a crypto expert and math is hard, I would be looking for an existing implementation as C lib.
|
# ? Apr 20, 2012 01:20 |
|
Rello posted:Hoping this is the right place to ask this, This probably deserves its own thread, but IMO, the most important classes by far are algorithms and architecture. Almost everything else is either in preparation for those two, or relies heavily on what you learned in them.
|
# ? Apr 20, 2012 01:24 |
|
Internet Janitor posted:Rello: Discrete Mathematics. What math courses would you recommend? I have a year of linear algebra, a year of stats, 2 years of Calculus (up to Multivariable Calculus), as well as a year of Computational Theory, with all of them being fairly proof heavy. Thinking about taking Combinatorics, 'Chaos, Dynamics and Fractals', and Differential Equations, but none of them are required for my degree. ultrafilter posted:This probably deserves its own thread, but IMO, the most important classes by far are algorithms and architecture. Almost everything else is either in preparation for those two, or relies heavily on what you learned in them. Gotcha, I'll be covering software architecture in all my software engineering classes, so hopefully I'll be good. Thanks,
|
# ? Apr 20, 2012 02:05 |
|
Rello posted:Thinking about taking Combinatorics, 'Chaos, Dynamics and Fractals', and Differential Equations, but none of them are required for my degree. Of those, I think Combinatorics might be the most directly applicable to CS, although there will be some overlap with good courses on Algorithms and Computation Theory. See if you can find any courses on Cryptography- that can be a lot of fun. When I took Crypto I had a professor who counted source code as "showing your work" and I treated the assignments as programming practice.
|
# ? Apr 20, 2012 02:12 |
|
Rello posted:What math courses would you recommend? Read this for algorithm stuff if you're not going to be taking a class directly about it.
|
# ? Apr 20, 2012 02:16 |
|
Looks like the only cryptography course my school offers is a graduate level math course, and I don't think I'll meet the prerequisites . I will be taking a class directly on algorithms but I'll skim through that book really quick when I have time.
|
# ? Apr 20, 2012 02:25 |
|
.
maskenfreiheit fucked around with this message at 21:29 on Apr 28, 2019 |
# ? Apr 20, 2012 03:04 |
|
GregNorc posted:1 problem: I am on OSX. No rename tool, hence trying to write my own. Your original question is kind of confusing, since you start out saying you want to append but then provide pseudocode that prepends. I'm going to assume that the code is what you're after. You're not actually that far off; a simple pure-bash approach: code:
|
# ? Apr 20, 2012 03:19 |
|
peepsalot posted:Got a crypto question. I'm interested in doing digital signature for the purpose of verified firmware updates on an embedded device. So the firmware updates will come from single source (me), and the embedded device would contain my signature's public key in it's existing firmware. The "don't roll your own crypto" rule applies even more to cryptographic protocols than to the actual crypto algorithms. You are attempting to design your own cryptographic protocol. DON'T DO THAT. The protocol you want is probably something like CMS which you can find a perfectly good implementation of in OpenSSL. If you can't find a CMS implementation, then try to find PKCS#7. Those protocols will let you send a signed-and-encrypted message and will do all the hard work of making sure it's correctly formatted and delivered. Literally hundreds of people have worked long and hard to make well-reasoned protocols like CMS. You are not capable of doing a good job on your own. If you're asking the questions you have in your post, then you aren't even qualified to do a lovely half-assed job. OpenSSL is a fine library, and if you can't use it, there are many other fine libraries out there.
|
# ? Apr 20, 2012 03:28 |
|
|
# ? Jun 9, 2024 03:40 |
|
peepsalot posted:I know that typically a signature is done by making a hash of the message and then signing that hash, but for my case I would much rather sign the entire message if at all possible. quote:I would just like to discourage the reading/disassembly of the firmware by having sending out plaintext firmware updates(I realize if they have physical access to the device they could hypothetically read the data from the chip by driving pins with external circuitry or whatever, this is just an small added deterrent that I would like to have). Encrypt the entire thing with AES using some secret key. You're clearly aware that this isn't an airtight solution. Sign the message before you encrypt it. (Encrypt the message + the signature, not just the message). Don't use strncmp to verify the signature.
|
# ? Apr 20, 2012 03:35 |