{"id":15713360,"url":"https://github.com/timothygu/website","last_synced_at":"2025-03-30T18:45:56.503Z","repository":{"id":66192542,"uuid":"42019331","full_name":"TimothyGu/website","owner":"TimothyGu","description":null,"archived":false,"fork":false,"pushed_at":"2015-09-06T21:25:54.000Z","size":3246,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T21:23:31.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimothyGu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-06T21:24:42.000Z","updated_at":"2015-09-24T18:27:08.000Z","dependencies_parsed_at":"2023-02-20T00:00:55.532Z","dependency_job_id":null,"html_url":"https://github.com/TimothyGu/website","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fwebsite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fwebsite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fwebsite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fwebsite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyGu","download_url":"https://codeload.github.com/TimothyGu/website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365638,"owners_count":20765546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T21:22:24.397Z","updated_at":"2025-03-30T18:45:56.015Z","avatar_url":"https://github.com/TimothyGu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Semantic Code Search Engine\n\nQ: What is the Semantic Code Search Engine (SemQuery)?\n\u003cbr /\u003e\nA: SemQuery is a search engine intended for querying codebases.\n\n###Full Explanation:\nCode is a system used to represent logical concepts such as looping, conditions, and other computational actions in textual form. Many programming languages represent similar concepts using different textual forms. For example, this is how a function that adds two numbers, a and b, is declared in various languages:\n\n######C:\n```C\nint add(int a, int b) { \n  return a + b \n}\n```\n######JavaScript:\n```javascript\nfunction add(a, b) { \n  return a + b \n}\n```\n######Ruby:\n```ruby\ndef add(a, b)\n  a + b\nend\n```\n######Go:\n```go\nfunc add(a int, b int) int { \n  return a + b \n}\n```\n\nAlthough all these declarations represent roughly the same concept, they have different textual forms. In fact, a concept can have multiple textual forms within a single language. This C snippet below defines an identifier, foo, in three different ways.\n```C\n// first way\nint foo = 3;\n\n// second way\n#define foo 3\n\n// third way\nvoid foo() {}\n```\nThese three declarations have differences, such as type, and how they are processed by the compiler; nonetheless, they are all declarations that define foo in some way.\n\nSay we are inspecting a C codebase/program we are unfamiliar with and we come across this:\n```C\nprintf(“%p”, foo);\n```\nWhat is foo (where was it defined)?  Perhaps if it was defined in the line above it is not hard to figure out. But what if it was defined hundreds of lines above? Or in a different file? Search for foo, of course. But any occurrence of foo is not necessarily the definition. Ok, search for a definition of foo, in that case… right? Not so easy, definitions can have multiple forms (as demonstrated above!). Even if you searched for the correct type of declaration, different coding styles, whitespace, etc. could mess up your search. Why is this so hard? All we want is to find a definition of foo. If a compiler can do it, we should be able to do it easily as well. \n\nNow, imagine a search engine that can search for the idea you’re thinking of, that is, it understands the semantics of your code. We could enter a query such as:\n```\ndefinition(name = “foo”)\n```\nand instead of searching for the text `definition(name = “foo”)` directly within the code, it would search the code based on the code’s meaning. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothygu%2Fwebsite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothygu%2Fwebsite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothygu%2Fwebsite/lists"}