|
Shinku ABOOKEN posted:I am trying to intercept and modify network traffic going through an "ad-hoc" network running on my Windows 7 laptop (my laptop is the access point). Get some kind of proxy thing like Proximitron(sp?) and that should let you do it
|
# ? May 24, 2013 22:26 |
|
|
# ? May 29, 2024 21:51 |
|
Here's a more philosophical question regarding software design. Everybody talks about "simplicity," but I feel like that doesn't entirely represent the value everybody wants. Something that is simple can be very crude. I was trying to find a better word to get to the core of this. In normal language, the best I could really find is "elegant," but that can imply it is delicate or fashionable. After floating around with this, I came across an old Italian word that only recently became popular in English: sprezzatura.quote:a certain nonchalance, so as to conceal all art and make whatever one does or says appear to be without effort and almost without any thought about it It's traditionally used to define people, originally courtiers, and more recently as ladies/gentlemen, but it sounds more apt. Regardless of language or subdisciplines, I figured the programmers of the thread have an idea of what I'm trying to get at, and if there's a very concise word or words to describe design simplicity.
|
# ? May 25, 2013 05:53 |
|
Shinku ABOOKEN posted:I am trying to intercept and modify network traffic going through an "ad-hoc" network running on my Windows 7 laptop (my laptop is the access point).
|
# ? May 25, 2013 06:05 |
|
Rocko Bonaparte posted:Here's a more philosophical question regarding software design. Everybody talks about "simplicity," but I feel like that doesn't entirely represent the value everybody wants. Something that is simple can be very crude. I was trying to find a better word to get to the core of this. In normal language, the best I could really find is "elegant," but that can imply it is delicate or fashionable. After floating around with this, I came across an old Italian word that only recently became popular in English: sprezzatura. I don't think "sprezzatura" is the right word. Perhaps you're looking for "parsimony".
|
# ? May 25, 2013 08:14 |
|
The Gripper posted:I think you'd need to somehow route all traffic into userspace, modify things there then send it back out. If you're not doing that then what you're likely capturing/trying to modify is just a copy of the actual traffic, which is being delivered to your capturing tool as well as being sent on it's way to it's destination at the same time. Apparently I need to either write a filter driver or use Windows Filtering Platform for this. I am not being paid enough to work on Windows Driver development and looking at WFP's docs I see that the filtering rules are not what I need and I don't think I can do TCP injection with it Welp, I guess it's time I try to make Linux work on my laptop again.
|
# ? May 25, 2013 13:39 |
|
floWenoL posted:I don't think "sprezzatura" is the right word. Perhaps you're looking for "parsimony". Wouldn't that imply cheapness? I didn't think that was regarded as a good term.
|
# ? May 25, 2013 15:32 |
|
I know I'm still new here, but I was wondering if there's any interest in a thread on esoteric programming languages? I've been wanting to make one, but most of the threads in this forum seem huge and helpful, and I don't know if a thread on esoteric programming languages would be either.
|
# ? May 25, 2013 18:20 |
|
Just start it and see how it goes.
|
# ? May 25, 2013 18:28 |
|
Rocko Bonaparte posted:Wouldn't that imply cheapness? I didn't think that was regarded as a good term. There are two definitions. I'm thinking #2 in http://www.merriam-webster.com/dictionary/parsimony . It's worth pointing out that Occam's razor is also known as the "law of parsimony".
|
# ? May 25, 2013 20:43 |
|
Foreign Tourist posted:I was wondering if there's any interest in a thread on esoteric programming languages? I would read this and probably write some crazy things for it, as is my way.
|
# ? May 25, 2013 21:56 |
|
"clean" is the word I use.
|
# ? May 25, 2013 23:48 |
|
I don't know how I'm this bad at bash scripting, but I'm trying to colorize my bash prompt and somehow breaking things in the process. If I call this function:code:
edit: Also if I set PS1=$(build_prompt), the prompt gets changed but most of the prompt line is written to twice edit 2: Never mind, think I got it. The extra brackets in "\[\x1B[31m\]" tell bash that the escape sequence won't take up any space in the terminal 205b fucked around with this message at 03:58 on May 26, 2013 |
# ? May 26, 2013 00:52 |
|
What reasons are there to NOT use CoffeeScript?
|
# ? May 27, 2013 01:32 |
|
The syntax is janky as poo poo. How many arguments are passed to f in f x, y, g a, b, c? What's the difference between f() -> 2 and f () -> 2?
|
# ? May 27, 2013 01:50 |
|
Thermopyle posted:What reasons are there to NOT use CoffeeScript? No explicit globals?
|
# ? May 27, 2013 02:23 |
|
Thermopyle posted:What reasons are there to NOT use CoffeeScript? You have to compile it.
|
# ? May 27, 2013 02:26 |
|
Doctor w-rw-rw- posted:No explicit globals? While I don't really agree with the syntax is janky assertion its debatable. On the other hand you can always assign variables to the global object so explicit globals are easy to declare. If you're writing for node and the browser you can always lead up your files with root = window or global.
|
# ? May 27, 2013 02:37 |
|
Doctor w-rw-rw- posted:No explicit globals? It's just "no shadowing", which is an absolutely terrible idea. It's not just "globals".
|
# ? May 27, 2013 02:44 |
|
yaoi prophet posted:The syntax is janky as poo poo. How many arguments are passed to f in f x, y, g a, b, c? What's the difference between f() -> 2 and f () -> 2? The lack of variable shadowing is a bit of an issue, but shadowing is an issue in some way in basically every language without explicit variable declarations. [1] My current least-favorite quirk is the following, which for some reason doesn't come up much in complaints about CoffeeScript: code:
|
# ? May 27, 2013 03:31 |
|
Thermopyle posted:What reasons are there to NOT use CoffeeScript? Adding a compile step. Beyond that, personal preference.
|
# ? May 27, 2013 05:13 |
|
yaoi prophet posted:How many arguments are passed to f in f x, y, g a, b, c?
|
# ? May 27, 2013 06:27 |
|
Plorkyeran posted:[1] My current least-favorite quirk is the following, which for some reason doesn't come up much in complaints about CoffeeScript: That's the main bit of syntax style I'm not big on, multiple function arguments. Everything else is really not that hard unless your exposure to Coffeescript is a quick browse of someone else's source, at which point really what did you expect if you're not planning to learn the language.
|
# ? May 27, 2013 06:49 |
|
yaoi prophet posted:The syntax is janky as poo poo. How many arguments are passed to f in f x, y, g a, b, c? What's the difference between f() -> 2 and f () -> 2? This is true, and it's a result of bolting on any neat looking bit of syntax without really considering whether it fits the language. My solution has always been to write Pythonic Coffeescript, although I'm not sure if CS derivatives like Coco or Livescript are any better.
|
# ? May 27, 2013 07:48 |
|
tarepanda posted:You have to compile it. pokeyman posted:Adding a compile step. Beyond that, personal preference. I can't find a quick link for it but at work we use some combination of source maps + node that skips the compile step and no js is generated on the filesystem / all stack / errors are for Coffeescript. I've mentioned before I think in this thread my annoyance with Coffeescript is having to track down other engineers mistakes like: code:
|
# ? May 27, 2013 14:18 |
|
Hughlander posted:I can't find a quick link for it but at work we use some combination of source maps + node that skips the compile step and no js is generated on the filesystem / all stack / errors are for Coffeescript. That sounds awesome, if you do track down a link please share.
|
# ? May 27, 2013 15:23 |
|
tarepanda posted:You have to compile it. I saw that as a plus. Catching problems before I go run & debug it = win Use Grunt.js to auto watch & compile, and it's no bother at all. I guess jslint catches similar problems, but I've had better luck with the full coffeescript compiler catching my fuckups.
|
# ? May 27, 2013 19:28 |
|
I have a calendar question: over a span of only 2 years, can you always assume that there are 52 complete weeks (from Sunday to Saturday) in the first year? I have a scheduling program I'm writing that shows a 3-year span of events in one chart. The schedules are weekly and end on Saturday. The picturebox/image of it looks more or less like below: [..previous year..][....current year....][.....next year....] Only the current year is editable and when the user clicks on a point on the chart, it selects a month & week that shows up in more detail in another picturebox. {The [next year] really only shows the events from the current year that overlap into next year, so editing "next year" is not really an issue} But anyway, I put all the data for the three years into one array. So I need a way to jump over all of the first year's weeks in this array somehow in order for the program to select the proper week (in the current year) for editing. ? Is it safe to assume that there will always be 52 complete weeks in a year, or should I write something to actually count the weeks? I can't find any reference that says that over a 1-year period there would be less than 52 weeks, and the extra 1/7th week wouldn't matter in only a 2-year span (it wouldn't possibly total another whole 7 days, because to do that would require 371 days in that year, which isn't gonna happen for a loooooong time yet....). This is for the usual Gregorian calendar--localization to other calendars isn't a concern--and is not an accounting issue, so there's none of that leap-year-every-seven-years silliness involved. edmund745 fucked around with this message at 20:13 on May 27, 2013 |
# ? May 27, 2013 20:10 |
|
52 weeks is 364 days, so yes, there will always be 52 full weeks in a single year. Edit: Missed the bit about needing weeks to run Sunday to Saturday. So no, there may be 51 actual weeks, but there will always be 52 seven-day periods. ultrafilter fucked around with this message at 20:27 on May 27, 2013 |
# ? May 27, 2013 20:18 |
|
There won't always be 52 complete weeks fully contained within the year (and in fact usually won't), but there will always be at least 52 weeks beginning in a given year.
Plorkyeran fucked around with this message at 21:15 on May 27, 2013 |
# ? May 27, 2013 20:26 |
|
Plorkyeran posted:There won't always be 52 complete weeks fully contained within the year (and in fact usually won't), but there will always be at least 52 weeks beginning in a given year. Well really I suppose that "52 complete weeks" aren't required in the year, since the "year" of the week is counted as whatever year the ending Saturday falls in. And there wouldn't be more (or less) than 52 Saturdays in a year since that would require less than/more than 364/365 days.... ? :|
|
# ? May 27, 2013 21:33 |
edmund745 posted:Well really I suppose that "52 complete weeks" aren't required in the year, since the "year" of the week is counted as whatever year the ending Saturday falls in. You do once in a while have years with 53 numbered weeks. Approximately every 5-6 years. Since 52 weeks add up to 364 days that leaves one extra, two extra on leap years. So unless you are at a century boundary (where there is no leap year), 6 years add up to 7 "spare" days, or 5 years in the cases of two leap-years within the period. Then you get those 53 numbered weeks in a year. Also, the ISO standard for week numbers is that a week belongs to the year which the Thursday falls in. The Saturday thing is USA, Canada and Mexico only, according to Wikipedia. (And over here in Europe, Monday is generally considered the first day of the week.)
|
|
# ? May 27, 2013 21:59 |
|
edmund745 posted:Well really I suppose that "52 complete weeks" aren't required in the year, since the "year" of the week is counted as whatever year the ending Saturday falls in.
|
# ? May 27, 2013 22:25 |
|
There are only fourteen possible calendars, and they can be parametrized by the weekday of January 1st and whether or not it's a leap year. It might be easiest just to count the number of weeks in each of those and be done with it.
|
# ? May 27, 2013 22:56 |
|
nielsm posted:unless you are at a century boundary (where there is no leap year) Careful with that...
|
# ? May 28, 2013 01:31 |
|
Although your week starts/ends at midnight on Sunday, whereas an ISO week starts/ends at midnight on Monday, you may find this very useful: http://en.wikipedia.org/wiki/ISO_week_date
|
# ? May 28, 2013 10:46 |
|
qntm posted:Although your week starts/ends at midnight on Sunday, whereas an ISO week starts/ends at midnight on Monday, you may find this very useful: No, it kinda makes my head hurt, really. ;) I will just have to count the Saturdays in the previous year it seems. -Either that, or write a metric/decimal calendar setup and convince everyone else that it's a REALLY good idea......
|
# ? May 28, 2013 12:24 |
|
I have a Windows programming question. I want to be able to draw Windows windows to a texture for use in a 3d environment. This is demonstrably possible since things like SphereXP and BumpTop do it. (See here http://superuser.com/questions/114390/make-the-desktop-look-like-3d-in-windows-7-and-xp ) I know the Desktop Window Manager API lets you access composition data and get thumbnails etc, but how do I go about getting the image of the actual window so I can use it as a texture in my own app? I appreciate any tips anyone has.
|
# ? May 28, 2013 17:25 |
Madox posted:I have a Windows programming question. I want to be able to draw Windows windows to a texture for use in a 3d environment. This is demonstrably possible since things like SphereXP and BumpTop do it. (See here http://superuser.com/questions/114390/make-the-desktop-look-like-3d-in-windows-7-and-xp ) Raymond Chen covered some of this just a short while ago: http://blogs.msdn.com/b/oldnewthing/archive/2013/05/13/10417964.aspx I'm not sure if that can actually help solve your problem, though.
|
|
# ? May 28, 2013 18:15 |
|
nielsm posted:Raymond Chen covered some of this just a short while ago: http://blogs.msdn.com/b/oldnewthing/archive/2013/05/13/10417964.aspx That method doesnt seem to give me something I can use as a texture of a window. I have also found this page which talks about IDXGIOutputDuplication interface to the desktop. http://www.virtualdub.org/blog/pivot/entry.php?id=356 This returns a bitmap stream of the windows desktop, but doesn't let me get each window separately. It seems promising though.
|
# ? May 28, 2013 19:12 |
|
|
# ? May 29, 2024 21:51 |
|
pokeyman posted:That sounds awesome, if you do track down a link please share. Turns out it's just native CoffeeScript 1.6+ Using 1.6.2 and NodeJS 0.10.5 our command-line just looks like: nodemon server.coffee -command -line -args
|
# ? May 29, 2013 14:13 |