Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
So I was :420: (not now, earlier) and programming and thinking about the finally statement. Is there any god drat reason for the finally statement? The only situation I see using finally in is if I didn't want to put a catch statement after a try which is a horrible practice anyways. And even if I did want to do that, couldn't I just use catch { } instead?

Sorry if I'm retarded and there actually is a good use for finally and I just never figured it out.

Edit: C#.

Adbot
ADBOT LOVES YOU

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I didn't think about catch throwing the exception. When I took java my instructor straight out told us he had no clue what it was for. Thanks.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

floWenoL posted:

You should brush up on exceptions and how they're used, as it seems you don't understand them.

No kidding, that's why I asked. I started off with assembly and C so this is new to me. Chill with the programming e-peen.

JoeNotCharles posted:

Then the Java you were taught is crippled, because finally is fundamental.

Pseudo-code, since it's been so long since I worked in Java:

code

The code in finally always gets called, so it's where you put clean-up code that always has to happen no matter whether exceptions are thrown or not.

Without finally, you'd have to write this in one of two ways:

code

In this case, it's just one line, but if you had more complicated things to clean up, or lots of different exceptions to catch, repeating the code would be very bad. It's really easy to forget to put "f.close" in the exception handler, which would mean if an exception happens your file stays open forever.

code

This is just clumsy and cumbersome, and breaks down as soon as you have more complicated control flow.

Actually, it just occurred to me that neither of these will work if you don't want to catch IOException - if your routine is supposed to throw exceptions to the parent, there's absolutely no way to safely clean up without the finally statement:

code

C++ doesn't "need" a finally statement because it doesn't have garbage collection, so thing's are guaranteed destroyed as soon as they go out of scope, not "whenever the system decides it needs some more memory". (But sometimes you have to jump through some hoops to make RAII work naturally when a finally statement would be easier - welcome to C++.)

code

Someone who doesn't know what finally is for has no business teaching Java.

This made it really clear to me, thanks. I can think of a few places where I should have used it before. The guy that taught it was sorta in the same boat I was in. He does more low level programming and got stuck teaching java. I ended up learning java from my horrible textbook anyways.

dougdrums fucked around with this message at 07:45 on Mar 2, 2008

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
im dum

dougdrums fucked around with this message at 17:57 on Jul 18, 2009

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Is there any way to plop a single push or pop into a 64 bit program with Visual Studio? As far as I know there's no way to do 64 bit inline assembly or specify naked calling. I know there's no good reason to do this, but I wanna do it anyways.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
The only thing I can tell you is that I like the organization and physical size of the Springer books I've read, but the cover of that second one is too funny to not mention.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

22 Eargesplitten posted:

Looking that whole thing up, that makes sense. My teacher also taught us never to use GOTOs, and any global variables had to be thoroughly defended as necessary. The one case I remember her allowing it in was when someone used multithreading to clone Pipe Dream for a final project. She seemed old enough to have been in college in the 80s or late 70s,and I think she had taught her whole career.

Are GoTos still considered bad? I read up on Google's Java standards, since I want to start coding in what at least someone would consider best practices, but none of that was brought up.

I am just now realizing how far I have to go before I'm good enough to win anyone over with a portfolio. It's probably not even worth putting any of my current work in the portfolio.

As far as Java is concerned, goto doesn't exist. I've never done it, but I imagine that the only arguably sane use for goto today is to explicitly break out of nested loops. It's very complex and confusing for human beings to follow since without some sort of hierarchy we lose the plot real quick.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I'm making a website and I want to use websockets, but I can't really figure out how much they'll get blocked on the client side. Web searches just seem to indicate that it is a problem, but I can't figure out the extent of it. And if they are blocked, how might I account for that? The last time I made a website beyond simple text and headers, full duplex for the web didn't exist afaik, so these are new waters for me.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I mean crypto isn't voodoo or anything, there's a plethora of information on cr.yp.to alone. You can either trust an implementation on reputation, audit it and then trust it, or roll your own and compare it to a known good one. I mean you can :tinfoil: about it all day but those are your options, there must be some trustworthy human being out there to write and examine crypto code, if not yourself. Plenty of people use NaCl with no problems, DJB is also quite critical of everything. I mean NaCl was created to solve the exact problem we are discussing. IMO you shouldn't aim for a ~*perfect solution*~, it's a matter of risk mitigation and isolation vs resources. You shouldn't be thinking of how to keep someone out, you should be focusing on how much damage could be done if any one piece were to fail.

ExcessBLarg! posted:

The problem is that his software is also frozen at the time it's written, so it doesn't adapt well to future technologies and best practices. It's also incomprehensible. Honestly, DJB is an academic though, and while nacl meets his academic goals it's really up to the community to adopt it and maintain it, which they haven't really done.

This is why the advice to never roll your own makes me uneasy. It sounds like anti-intellectual cargo cult speak to keep devs stupid about crypto by treating it as some higher-than-human concept. It inclines otherwise bright people to not seek any insight for their problem, and to blame their mistakes on others when things go bad. It's no wonder most contributions come from academic institutions, governments, or criminals/rebels. They're the ones that have the extreme cases of risk, resources, or both. They have to give a poo poo about contributing, it's quite explicitly in their interest to take the time!

Still in most cases it's probably a bad idea to roll your own, since resources exist to make things quicker, and poor nielsm just needs a system that prevents him from being fired, sued, or in the worst case ruining people by letting such reports be public (if I'm guessing what he does correctly from posts). I probably generally agree with the other posts. As far as your case is concerned, I'd be the most worried about this being a contradiction:

2. One or two persons of managerial duty will need to extract and process the data from all users
5. Breaking the secrecy of one user's data should not break the secrecy of any other users' data

My seat-of-the-pants solution would be to hand the managers smartcards and have the access audited.

And anything I've written involving crypto is probably not being used for anything super-duper secret besides being a nerd on the internet, so my advice my be terrible.

E: Hell, it might be a good idea to start a crypto thread.

dougdrums fucked around with this message at 20:57 on Aug 4, 2015

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

nielsm posted:

It really isn't a big thing I've been asked to develop, it's a staff management system for a small volunteer organization, where I'm volunteering myself. People signing up would be asked to provide any medical information that could be relevant to the work. The issue is that storing personal medical information, together with information identifying the physical person it relates to, without adequate security measures, could be considered criminal negligence. So that's why I'm considering that sort of crypto system, by the idea of "better safe than sorry", but honestly also just as an interesting mental exercise.

Oh jeez, I must have mistaken you for someone else. It does seem a little excessive to bring smartcards into this.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Oh, like I said I think we generally agree. That's why I was defending nacl as far as C is concerned. I've just seen a few people turn "don't roll your own" into "not my problem".

dougdrums fucked around with this message at 21:34 on Aug 4, 2015

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I mean iirc nacl was a work in progress in 2009. The file is hosted on the co-author's website too.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

midnightclimax posted:

What finance APIs for stock data do you guys use? I googled a bit and there's a dozen to pick from, not sure if I should just go with Yahoo. It's for a personal application, nothing big, just learning to program and looking for data to mess with.

If you just need daily data yahoo's is really easy to work with.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Could you use a high-volume whois service and parse out the orgname line? For example:

code:
user@hostname:~$ whois 129.42.38.1 | grep OrgName | awk '{split($0,s,":"); gsub(/^[ \t]+/,"",s[2]);  print s[2]}'
IBM Corporation
I think that might be the best you can get though, without manually updating the ranges, when I try the forums it doesn't work so well:
code:
user@hostname:~$ dig forums.somethingawful.com +short | xargs whois | grep OrgName | awk '{split($0,s,":"); gsub(/^[ \t]+/,"",s[2]);  print s[2]}'
Steadfast Networks

dougdrums fucked around with this message at 21:05 on Sep 10, 2015

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

idontcare posted:

I'm looking for more of something that maps network ips to company names. Like my example, I need to know if someone who works at IBM and is on their network is looking at my site, if that makes sense. I know Hubspot and Marketo offer something like this. I want to do what they are doing.

I'm not sure I understand what you're looking for? The only conceivable way I can think of is to pull the data from a registry, because they're the only source for it as far as I know. I'm so stumped, I actually called Marketo (Hubspot gave me a machine) and asked your exact question and they told me they provide no such product. Looking at MaxMind again (https://www.maxmind.com/en/geoip2-isp-database), it looks like they do it nearly the same way.

Actually I think I might understand you, are you looking to see if a user's company is statistically identifiable by way of cookies and whatnot? I.E. user x has "works at IBM" on facebook and tweets about watson?

dougdrums fucked around with this message at 23:52 on Sep 10, 2015

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I thought the directive to generate 32 bit code in 64 bit masm was "bits 32" but I guess it's not. I think that's for nasm...

How can I tell masm to mix 32 and 64 bit code? Should I just be careful? I'm doing it in order to swap out a clunky bootloader for grub.

Nvm, it's pretty easy to mush them together using the linker maps.

dougdrums fucked around with this message at 18:46 on Jun 25, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
You've gotta use the flowchart! ;)

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
This is not being nice, really, but there are a few things:

- read their robots.txt
- handle cookies
- fake user agent header
- fake referral header
- other odd header tokens
- randomize the order of page crawls

These are problems I've encountered before, when I was trying to do fancy natural language stuff by scraping web forums.

Also almost forgot:
- hidden form submit values

dougdrums fucked around with this message at 21:08 on Aug 3, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

pokeyman posted:

My experience is that I completely forget to keep using whatever I've been using after a couple weeks. So my answer is literally anything as long as you'll think to open it up again months later.

I used to do this too, and what fixed it was using a repo service like bitbucket or github where a wiki and issue tracker is already provided. It seems silly to use an issue tracker by yourself, but it works well. I don't think there are any folders involved though.

Besides that, I keep a notebook on my desk...

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I think the most useful thing you can do is find (or write) a bunch of lovely code and debug it, until you get a good intuition of all of the hosed up edge cases that can compound themselves. Get real handy with GDB or windbg.

The second most useful thing would be to read technical documentation front to back. Books on the topic are good for offering some perspectives on how to approach a problem, but it's something you've really gotta know from the bottom up, because that is your advantage as an offender. Instead of starting off with something that is explicitly related to security, pick up a comp org book like "Computer Organization and Design" or "Write Great Code Vol. 1", and then read the processor development manuals: http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html http://developer.amd.com/resources/developer-guides-manuals/

If you don't understand how something works, just write a little C program to prod the thing and see how it jiggles, and then extend what you've discovered to a functional program. When it comes a remote host running an arbitrary service, the best you can do is gather up as much information as possible about the system and try to mock it up locally. Also keep in mind what seems absurd from a "normal" development standpoint is common place in malicious code. You really could give a poo poo less how long something takes or how much memory you're using, as long as the end goal is accomplished. The machine will perform its duties, either way.

I was a real ornery teenager before ASLR came into use ...

JawnV6 posted:

Fun to think about new features reducing ASLR's efficacy: Dedup Est Machina: Memory Deduplication as an Advanced Exploitation Vector. Craft pages that look like one with a guess as the randomized portion, write and see if it had been deduped.

Wow they really took that all the way, this is good stuff.

dougdrums fucked around with this message at 12:19 on Aug 18, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
You can use SSE\AVX features on intel to at least do a few doubles at once: https://software.intel.com/sites/landingpage/IntrinsicsGuide/ or use NEON on ARM.

I forgot, the x87 can use 80 bit floats but I don't know anything about it.

dougdrums fucked around with this message at 20:26 on Aug 18, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Yes, but MMX regs are aliased with the x87 regs. I think FXSAVE and FXSTORE operate on both the MMX/x87 state and XMM regs.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

Rocko Bonaparte posted:

Are there still any major websites using CGI for the pages? I am trying to contrast Django with the entirity of CGI, and it looks partisan to have ZERO examples to counterbalance even just Django--let alone MVC frameworks.

Edit: OMG I think Paypal still uses CGI. :stare:

Iirc CGI used to just straight up run your program with the arguments given over http, thereby creating a process per every request.

I believe most fancy web things now use what is called fastcgi. The program remains resident, and the arguments are sent over a socket instead of spawning a bew process each time. Fastcgi is simply a protocol offered by your web server of choice.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I feel like the concept of MVC has been around forever, but the distinction has more use now that webpages are no longer static entities. Once flash, ajax, etc came into play it became less useful to structure things strictly in the manner of html templates.

dougdrums fucked around with this message at 18:40 on Oct 13, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Yeah, nothing is going to inherent from Mom or Dad, so you might as well seal them and use Type.IsAssignableFrom() to do your type matching, instead of having a big circular mess.

It's not the worst thing ever, but it's a bit overkill based on what was posted.

I mean generally you'd make an IDad and then have class Person extend IDad to make a Dad, because it's also likely that Mom and Dad share the same members, but it's just that one of them needs to do some IDad stuff now.

I guess another approach would be to hit the enums with [Flags] and get rid of the unnecessary hierarchy.

dougdrums fucked around with this message at 15:04 on Oct 18, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

baby puzzle posted:

I know how to get from dB to amplitude. I just don't see how -12.7db and 23% amplitude correspond to 50% volume. I'm missing something here.

I guess -12.7db is 50% of the way to negative infinity decibels? Maybe that's how I should be looking at it.

Hearing isn't linear. Most audio equipment scales amplitude logarithmically to account for this.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
The only jobs I've had where music was played music all day involved manual labor.

I can't stand programming and listing to music though, unless I'm wearing headphones and using it to keep me from being distracted otherwise.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
You could try to find someone's 'mini' version of some architecture on opencores.org, as another option.

I'd go with z80 though, but mostly because I owned a calculator in high school so I'm already familiar.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Transformations are done by multiplying what are called Homogeneous Matrices together. The first three columns of a 4x4 matrix describe the direction of rotation in the x, y, and z axis (pan, tilt and roll, respectively); and the fourth column describes the position. By setting up your matrices correctly, you can perform matrix multiplication that has the desired effect ...

I think this is a good reference from a programming standpoint: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/

This covers specific translations point by point, and describes how rotation works: http://www.j3d.org/matrix_faq/matrfaq_latest.html

On that note, I was working on a GUI in opengl 4. Is it better to use opengl's coordinate origin of the bottom-left, to be consistent, or to use the top-left, which I think is more common for GUIs?

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I don't think it would be possible to do this at any level of certainty, since there's nothing that relates any other unicode glyph to latin glyphs, or frankly any other language's glyphs to another. I mean, if I wanted to use the glyph '十' as a latin 'T' , what can you do? And what if a glyph makes up two latin letters, like "⠟叶"?

The only thing I can think of is to filter it through the categories, like: http://www.fileformat.info/info/unicode/category/Lu/list.htm has a list of all upper case letters ... While some may not be latin or renderable, you can match the unicode description up with its letter fairly simply. Here is a big ol' csv file that can help you sort through them: http://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt

Are you trying to make a sort of 8-bit pidgin language? Or are you trying to filter out strings you don't want? Or something else?

dougdrums fucked around with this message at 18:36 on Dec 5, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Ah, that's is a common, sensible, and difficult problem. I guess the first thing I would do (and you've probably already tried) is figure out what encoding the device qualifies as "normal", and see if there's something to go from utf-8 to moon encoding. If this isn't possible, or the encoding is really proprietary, you're left with simply making a big lookup table like you're already doing.

It is definitely impossible to shoehorn every, if not even most western names into the latin alphabet, and there's nothing unicode or anything else can really do. I think most users with non-latin names know best how to convert their names. Your best bet might be to allow the user to enter a latin display name wherever, along with their utf8 name, and display the latin name on the device. If that is not an option, as you don't have access to the input form, then I think you just have to keep entering the names manually.

Maybe if you posted utf-8 with the garbled result, we could take a stab at guessing the encoding?

Names are a strange thing. I believe Stallman is attributed with saying, "names are just names" when asked about the name of emacs. If I recall the story correctly, ed and emacs were named after an ice cream store, which was named after two deceased homeless men. My last name, despite being four letters, is utterly and hilariously unpronounceable for Mandarin speakers (also for Spanish and some English speakers ...). When I started learning Mandarin I was pretty stubborn about using my roman name, but it soon became clear that using my roman name was way too distracting and confusing, and I needed to use the proper syllabic Mandarin version instead. There are a ton of people who are still not able to represent their own names on a computer, it is an issue that runs pretty deep ... imo people are too arbitrarily attached to their own names. If your device somehow managed to mangle my name, I don't see how I could get too upset as long as I can still go "ya! that's me!".

dougdrums fucked around with this message at 19:47 on Dec 5, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

ulmont posted:

Ken Thompson wrote "ed", which is just short for "editor".

Editor MACroS was almost certainly named for being, well, editor macros. You wanted "bolio" (which may have been named for Emack & Bolio's after EMACS had already named).

Finally, is your name one of those Eastern European of-course-W-is-a-vowel types?

Nah it just has an odd pair of consonants that you'd have to guess if you can't bring to memory a time when you've heard it ... I guess.

I figured I messed that up somehow :v: I also figured it was bs.

ed seems more reasonable as a hobo's name too though.

dougdrums fucked around with this message at 01:51 on Dec 6, 2016

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

Hammerite posted:

The web by 2003 surely wasn't as primitive as all that. Maybe PDF isn't doable, I don't know. HTML with embedded images of the equations would not be great, but it would be substantially better than what that document does.

Well I was going to refrain from pointing out that the first version was in 1998 I think, and somebody probably did make a pdf of this by now, I just don't know where it is.

I mean, it serves its purpose :shrug: You can still understand it on a computer almost 20 years later.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
With C# (or C whatever) on Windows you can do a few things. You can hook it using SetWindowsHookEx but I'm pretty sure that there are better ways now. I've used the raw input api and it works as advertised. Another option would be to use DirectX, but I couldn't tell you how.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I've used cmusphinx for a small voice-command project and it worked very well. It'll run on the the raspberry pi 3, and they've already collected all of the extra data you need. On Windows though, the Microsoft speech system is super good, accurate, and way easy to use.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

huhu posted:

I've got a book on data structures and algorithms and it's decent enough but the practice problems are garbage. Are there any books that have practice problems with answers where the solutions are like "I would use x and y algorithms to solve this because a,b and c"

What book do you have? I have "Algorithm Design" by Kleinberg and I think the problems are ok. Also I found http://www.cs.princeton.edu/~wayne/kleinberg-tardos/ when I was trying to make sure I didn't mess up the names.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Is there a language that you prefer?

I've started using Flask, as far as python goes. I think it's probably the easiest sort of web app thing to use. I made an 'upload thing, poop report' app this weekend with the aid of this extention.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
I noticed gmail proxying images earlier this week. I assume its use is to prevent people from fetching IPs, user agents, etc. Of course it still indicates that the user loaded it, it's just less identifying information.

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

a dangerous thot posted:

That looks really neat, thanks, I'll be sure to check both suggestions out

One thing I forgot to add is how nice this modular design would be because you can make great use out of a visualization library when you could treat any event, function, or field as a signal to make an arbitrary graph. just make probes at runtime as you desired, or just make further events for signal behaviour.. onrise, onfall, double click etc. Having the things you want emerge from design and use rather than always having the foresight of explicitly extensions

If you know and want to use C#, you could implement an IQueryable provider that spits out ExpandoObjects. Your IQueryable provider manipulates its ExpressionTree to provide the "stacks of delegates", perhaps as more IQueryables. When you get a mutated version of your object from your IQueryable, you can replace the properties of the old ExpandoObject while handling its PropertyChanged event. Also you could just straight up use events in ExpandoObjects (as in, ExpandoObject allows appending arbitrary event handlers to a property).

Some MSDN links:
https://msdn.microsoft.com/en-us/library/system.dynamic.expandoobject(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/bb351562(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/system.linq.expressions.expression(v=vs.110).aspx

This is a lot of "reinventing the wheel" though. You could just use some lisp or templating ... but I think erlang is the most suitable, from what I understand of what you're trying to do ...

Adbot
ADBOT LOVES YOU

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

Janitor Prime posted:

Stupid question time: What's the difference between a log and event? Both are immutable, timed data that just keeps pouring in. So are there more specialized dbs for each?

I would consider a log to be a list of events ordered by the time they occurred, possibly partitioned by another key. As in, "To log an event." You might be thinking of a case where events could have different types to be partitioned by in a log. "Time-series" is the more general term.

On mutability:
Events could also happen at a separate time than they are logged. A retail sale that takes place in Beijing could be executed "before" a sale that takes place in New York, but the marketing office in Atlanta may see the New York sale first. Of course the Atlanta office may be on fire, in which case they'll all be stuck in a local queue until the fire is put out. In order to retain lookup performance, you will often need to re-sort parts of this "log" as events come in. So the event records are immutable of course, but not the log itself. Imagine four balls on the edge of a cliff, logging works the same way.

I think InfluxDB is the most well known DB for time-series information. They call their engine a time structured merge tree. That page also goes over the nature of time series data in very good detail.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply