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
dirby
Sep 21, 2004


Helping goons with math
Since the functional programming thread is dead and archived, did anyone here go from Haskell to Purescript? They seem similar enough that it will be easy but I'm a little woried about the lack of laziness biting me.

Adbot
ADBOT LOVES YOU

dirby
Sep 21, 2004


Helping goons with math
I don't work in IT/code much, but is every IT job as much about things other than coding as it seems to an outsider? Like ensuring someone else follows a style guide, making sure to use the VCS the right way, project management stuff, setting up a framework for testing of code that works well, etc.

Maybe this is just bias because the above are what people usually argue/complain about, but I'm curious about what is typical/if it depends a lot on the job, etc.

dirby
Sep 21, 2004


Helping goons with math

AgentCow007 posted:

What is the point of the compsci course "automata"?

Also it's a compsci course, not a programming course, so it need not have any direct bearing on programming you do.

Similarly, the Halting Problem is very significant in compsci but isn't going to affect programming in a direct way, etc.

dirby fucked around with this message at 15:43 on Dec 22, 2018

dirby
Sep 21, 2004


Helping goons with math
There are 10,000 accounts each of which are "up" or "down" on any given day, and I have charts of potential uptimes and definite downtimes. For example, maybe account 7 is up between days 3 and 6 and between 12 and 18 except for 13-15 and 17-17 (so it was actually only up on 3,4,5,6,12,16,18).

I want to extract info like "how many accounts were up on day 5?" I think I can write some ugly code to get at this, but is there a right way to do this sort of thing? (Ideally in Excel but I'll take whatever)

dirby fucked around with this message at 17:20 on Jun 30, 2019

dirby
Sep 21, 2004


Helping goons with math

ultrafilter posted:

How you solve this depends a lot on how you store the data. The easiest way is just to keep a record of the state of each account on each day, in which case it's just a simple SQL query.

Thanks. Can I easily build an SQL-queryable database from the tables I have? Maybe with Microsoft Access or something?

I'm imagining something like filling in the ranges (so "3-6" becomes "3,4,5,6"), deleting the down days up from the up lists, and then magically turning those lists of days into a database (which I haven't really worked with before, but I think the queries I'd want would be simple in SQL)

dirby
Sep 21, 2004


Helping goons with math

mystes posted:

What format is the data in now, exactly?

I have two csvs with three columns each: a column of account number, a column of the first date of a range, and a column of the last date of the range. One csv is for the potential up days and the other is for the down days. Account numbers are often repeated if there are multiple ranges for that account.

I think I could easily (outside of excel) make a single sheet with uneven rows like "account number, first up date, second up date, third up date,..." for making a database.

Edit: Mathematica's Dataset command might be able to get me the database I want.

dirby fucked around with this message at 18:18 on Jun 30, 2019

dirby
Sep 21, 2004


Helping goons with math

Khorne posted:

What are ways other people get through this phase of learning something that requires creativity or great understanding? Is there an actual term for this part of the learning process? It seems very hard to penetrate "I don't know what to do" without giving too much away and the entire point of the exercise being missed.
You're sort of asking how to tutor, in general.

It sounds like don't have a clear systematic process for tackling hard problems, but you have a lot of experience so you can solve them anyway. This makes tutoring an uphill battle because you're might be trying to convey understanding as opposed to conveying the ways of thinking and working that are likely to lead to understanding.

There's far more I could say than fits in a post, but here are a few concrete suggestions: 1. Make extra sure you're not asking something that's too hard for someone without relevant experience. 2. Have them write down (or type I guess) what they do know/understand that seems like it might be useful, as well as intermediate steps that might be useful, etc. 3. Explicitly call out and emphasize good habits like "what do we do when we don't remember the syntax?"

dirby
Sep 21, 2004


Helping goons with math

redleader posted:

monads are just the starting point on a long and nuanced journey though functional programming's 500,000 unique and subtly different mathematical objects. strap in.

Diagrams like https://github.com/JordanMartinez/purescript-jordans-reference/blob/latestRelease/41-Ecosystem/Type-Classes/Type-Class-Relationships.svg have a ton.

dirby
Sep 21, 2004


Helping goons with math

quote:

composition like this helps avoid inheritance diamond-of-death situations
I may be misreading the context, but it might be helpful to just google "Composition over Inheritance" and your language of choice.

dirby
Sep 21, 2004


Helping goons with math

Dominoes posted:

edit: Does Haskell have any use cases it's especially suited to?
This isn't exactly an answer to that question, but Serokell who uses Haskell lists 10 reasons to use it, and when companies that use it talk about why, they often talk about some of these, especially catching bugs early by not allowing you to compile code that has static type errors.

Also, I'm sad the functional programming thread is dead.

dirby
Sep 21, 2004


Helping goons with math

Tuxedo Gin posted:

I'm one of the weird ones that wants to understand the ins and out of what he's having built but isn't really unable[sic] to build it on his own.
Is there a significant difference between what you're asking for and something like commissioning some work and extra detailed documentation and regular conversations about the next feature to add and how to add it, etc.?

Basically, it sounds like you both 1. want to be able to build it yourself and 2. don't want to be able to but just want to understand how it was built (like "here is a lecture on why I coded it this way for the requirement you had"?).

Whatever you're looking for, it sounds like it'd be hideously expensive, quite possibly more expensive than, say, paying for a tutor (and a therapist?) for enough time to help you either get in a mindset where you can build it yourself or a position where you're more comfortable with just commissioning it or something.

dirby
Sep 21, 2004


Helping goons with math

Tuxedo Gin posted:

I'm not sure that apprehension/indecision about an important project warrants a dig at my mental health
Sorry, I didn't mean it as a dig at your mental health (and I think everyone could do with the help of a therapist from time to time, even if they're mentally well). I just meant that since I don't know you, I don't know the mix of source(s) of your frustration or what the best approach to combat that would be for you personally.

Since you referred to yourself as "an idiot", "lack[ing] motivation", and that you're looking for "patience and understanding" I thought that it might be worth at least considering a combination of finding the right person/resources externally and broadening options that could work for you internally. Like, if you can handle a tutor with 10% less understanding than you could before, that opens up X% more tutors as someone you could work with.

dirby
Sep 21, 2004


Helping goons with math

nielsm posted:

Yeah that's why my idea is you should be able to just save a workspace. You start the interactive REPL and import a bunch of modules, define some data and functions, and experiment with various ways to make something work. When you've got something useful, just save the workspace to a file which you can then reload to end up in the same environment again. Eventually it can then end up as a full, reusable module or similar.
But basically experiment-driven development.
What's the difference between what you're describing and notebook environments (e.g. Jupyter notebooks, which were brought up earlier)?

dirby
Sep 21, 2004


Helping goons with math

KillHour posted:

Edit: It really looks like the blue and white (both tangents negative or both tangents positive) are always wrong and the cyan and magenta (one tangent negative and one positive) are correct.


I know this is very late, and I haven't combed through the details, but I wonder if you ended up reinventing atan2, which probably already exists in your language.

dirby
Sep 21, 2004


Helping goons with math

Mirconium posted:

Hey, I just found this code snippet, and I have no idea what language this even is. Does this look familiar to anyone?



Edit: consensus seems to be that this is probably mathematica
Yes, that is exactly what the syntax and default coloring of Mathematica looks like. It's technically "Wolfram Language in a Mathematica Notebook" I guess.

Edit: It seems it may be Symbolic Lab Language which is build on top of Mathematica.

quote:

In one aspect, the scripting language is Symbolic Lab Language (SLL).

SLL is developed based on the Mathematica® language. On top of the user-friendly syntax and comprehensive data manipulation and visualization functionalities provided by Mathematica®, SLL further includes functions, objects, and knowledge representations specifically designed for the life sciences

dirby fucked around with this message at 04:00 on Jul 10, 2022

dirby
Sep 21, 2004


Helping goons with math

Grip it and rip it posted:

I'm trying to extract all of the comments from some .sql files, but I am not really familiar with SQL. I've looked around and seen a couple scripts that have been posted to pull comments out of files but they all seem to be written in SQL so I'm not 100% sure how they work.

At this link - https://stackoverflow.com/questions/55113413/how-to-fetch-the-code-comments-from-a-stored-procedure-function-and-populate-t there are two different sql scripts that look like they might be useful. Would I just plug these into the script editor to see exactly what they do? The comments I'm trying to extract use both formats (/* */ and --) and I'm looking to extract them from about 60 different files

Do you know any regex? This is the sort of thing that Notepad++ or grep could help you do pretty quickly.
Or if not, do you have experience with a programming language that could process text, like Python?
(Or maybe you were looking for the Request a tiny app thread?)

dirby
Sep 21, 2004


Helping goons with math

KillHour posted:

Would it be that different if you had = to assign by reference and := to assign by value? No, not really. But it would lead to a lot of other design consequences, and it's those that I'm interested in.
I don't think this is actually helpful to you at all, especially because the language works under a different "substitution rule" kind of paradigm, but Wolfram Language (the stuff Mathematica uses) is kind of similar to using := to assign by reference and = to assign by value (the reverse of your hypothetical).

The actual behavior is partially discussed at What is the difference between Set and SetDelayed? on Mathematica StackExchange, though that doesn't do a good job at explaining the difference between things like x=y+3 and x:=y+3, etc.

dirby
Sep 21, 2004


Helping goons with math
I wish I had a better way to access things for this, but I probably can't:
On a website behind a login, there's a page with a gigantic table (let's say 50k rows after it all loads), I would like to automate the checking of checkboxes in certain rows. But I know the exact format of the HTML I'm looking for: e.g. the first td tag will have a checkbox made with an input tag and the rows I care about will have the seventh td with class "foo" and the data will be of the form "<a href ...>17</a>".

Is there an easy way to script this, maybe with a browser extension or something?

My criterion is so simple that any language should be fine.

dirby
Sep 21, 2004


Helping goons with math

mystes posted:

...
If you need to do it a couple times: you can just make a snippet in the chrome developer tools and run that
If you need to do it a lot interactively: you can take the snippet and make it into a greasemonkey script or something once it's working
...
but it's probably simpler to get the rows or the elements that contain the data you want using document.querySelectorAll and then iterate over them and check the boxes within the rows/parent elements
Thanks! I think this should suit my needs.

Adbot
ADBOT LOVES YOU

dirby
Sep 21, 2004


Helping goons with math

Jabor posted:

how the heck do you say library
I think it's just that ToxicFrog knows that if you see a spelling like "lieb" then it could be German and hence pronounced with an "ee" or an "ee-uh" sort of vowel sound.

But Boris Galerkin was just using "lieb" to suggest (the English pronunciation of) "lie"+"b", so that the vowel matches the one every English speaker has in "library".

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