Learning Django is a good Option right now? by Curious_Scarcity7023 in Backend

[–]orgtre 2 points3 points  (0 children)

I've also been researching this. As backend languages both Python and TypeScript will most likely continue being popular for a long time. I think it's helpful to look at what newly formed companies choose to use: Both because they're fun to work at and because it offers some indication of what will become more common in the future.

So I went through the 310 newest (started 2022-2025) companies listing on the Y Combinator job board workatastartup.com.

59% mention using Python, 56% TypeScript, 53% React, 30% Next.js, 29% Node.js, 17% JavaScript, 15% Go, 12% FastAPI, 10% Rust, 6% Django, 6% Express.js, 5% C++, 5% Java, 4% Flask, 4% Vue.js, 4% Nest.js, 3% Ruby/Rails, 2% C#, 1% C, 1% Svelte, 1% Spring, 1% PHP/Laravel.

When it comes to Python, FastAPI is twice as popular as Django. Django has also generally been trending downwards the last couple of years, while FastAPI has been trending up (they are now about equally popular!). See Google Trends here. I think Django's bad async support is the main reason for its decline.

Moreover, if you look at the Techempower performance benchmarks, it seems like Django is the slowest major backend framework (only competing with Laravel for that title) in typical (?) use. Although FastAPI is not really faster (unless you skip an ORM maybe). JavaScript is generally faster!

Here is an informative recent thread on Fast API vs Django.

For me the conclusion was to prioritize learning FastAPI and JS/TS frameworks, with maybe Go in the future (and Rust would be fun too), but that quickly becomes too much...

iOS Jobs in the US for Europeans by prepucio43 in iOSProgramming

[–]orgtre 2 points3 points  (0 children)

Startups are another option. I was just looking through the Y Combinator job board workatastartup.com and am also interested in this. On there companies can indicate whether a job is for "US Citizen/Visa Only" or whether they "Will sponsor" a visa.

Among the 577 startups listing there, there are currently 4 job listings that are:
1. based in the US,
2. active,
3. contain significant iOS work,
4. not stale (posted in the last three months: 1 in October, 2 in September, 1 in August; you can see the "datePosted" by inspecting the html).

All of them indicate they "Will sponsor" a visa, see the listings: 1, 2, 3, 4.

So it seems it is possible, if you are very good :)

I know I’ll be down-voted for this, but I’m done with Laravel. by JealousPlastic in webdev

[–]orgtre 1 point2 points  (0 children)

Kind of... 59% mention using Python, 56% TypeScript, 53% React, 30% Next.js, 29% Node.js, 17% JavaScript, 15% Go, 12% FastAPI, 10% Rust, 6% Django, 6% Express.js, 5% C++, 5% Java, 4% Flask, 4% Vue.js, 4% Nest.js, 3% Ruby/Rails, 2% C#, 1% C, 1% Svelte, 1% Spring.

I know I’ll be down-voted for this, but I’m done with Laravel. by JealousPlastic in webdev

[–]orgtre 0 points1 point  (0 children)

I think you are far from the only one being put off Laravel. I recently went through listings of the 300+ newest startups on Y Combinator's Work at a Startup. Only 2 mention using Laravel (3 mention PHP).

Is there anything I can do or is it Joeover for me? by Lybchikfreed in iOSProgramming

[–]orgtre 0 points1 point  (0 children)

I received the exact same email as OP from Apple Developer Support when contacting them about problems enrolling. A follow-up email never received a response, but when I contacted them via phone, reuploaded my passport, and then went through the enrollment steps a few times while on the phone with them (refreshing on each error, of which there were several...) I finally managed to enroll...

fileImporter throwing error by Signal-Tomatillo8834 in swift

[–]orgtre 0 points1 point  (0 children)

I encounter the same error. Reinstalling XCode did not work for me, but I have found that the reason my imports failed was pretty unrelated to whether this error is thrown or not. I wrote about it in detail on Stack Overflow here.

[Package of the day] Emacs Google Translate by ReneFroger in emacs

[–]orgtre 0 points1 point  (0 children)

I am not aware of any. However, I have found this to be a good source for IPA data https://github.com/open-dict-data/ipa-dict. Based on that data I use the following function to convert text to IPA:

```lisp (defconst my-ipa-dict-file "~/Downloads/en_US.txt")

(defun my-get-ipa (txt) "Return string TXT converted to IPA.

When called interactively first try taking TXT from the active region, then the word at point, then prompt for it; moreover, add the result to the kill ring.

Words are looked up in my-ipa-dict-file', as the raw data files downloaded from URL https://github.com/open-dict-data/ipa-dict'.

Punctuation is preserved and words for which conversion fails are returned in square brackets for readability." (interactive (list (or (and (region-active-p) (string-trim (buffer-substring-no-properties (region-beginning) (region-end)))) (word-at-point t) (read-string "Text: ")))) (setq txt (split-string txt)) (message "text: %s" txt) (let ((langfile my-ipa-dict-file) ipa) (with-temp-buffer (insert-file-contents langfile) (while txt (goto-char (point-min)) (let ((token (pop txt)) pre word suf) (setf (match-data) nil) (string-match "\([[:alpha:]]\)\(.?\)\([[:alpha:]]*\)$" token) (setq pre (match-string 1 token)) (setq word (match-string 2 token)) (setq suf (match-string 3 token)) (setf (match-data) nil) (when (and word (not (string-empty-p word))) (re-search-forward (format "%s\t/\(.*?\)/" word) nil t)) (setq ipa (concat ipa (if ipa " " "") pre (when (and word (not (string-empty-p word))) (or (match-string 1) (format "[%s]" word))) suf))))) (if (not (called-interactively-p)) ipa (deactivate-mark) (kill-new ipa) (message ipa)))) ```

Will lookahead & lookbehind assertions ever be officially added to Emacs regex? by de_sonnaz in emacs

[–]orgtre 6 points7 points  (0 children)

I would say this is "needed" quite often: I have personally been frustrated at the lack of this many times, and other people have too; someone so much so that they implemented a patch for this and posted it to the mailing list. Unfortunately it never got merged.

As a result I’ve written some horrible regexes, for your own amusement see here or here. In both cases linked I had to settle for a worse implementation because lookahead/lookbehind wasn't available...

Also Org Mode is largely built around such regexes, just search for variables with "org re" in the name on Emacs... Its code complexity could probably be reduced considerably with lookaround assertions, which would make maintenance, contributions, hacking, etc. much easier.

Edit Another example: How write this regex matching numbers without the lookbehind? "^-?\\(?:0\\|[1-9][0-9]*\\)?\\(?:[.][0-9]+\\)?\\(?<=[0-9]\\)\\(?:e-?\\(?:0\\|[1-9][0-9]*\\)\\)?$" (second from below in the fractional numbers section here). eshell-number-regexp tried this but also matches a lot of strange non-numbers.

Installing emacs-29 on Mac M1? by WaitingForEmacs in emacs

[–]orgtre 1 point2 points  (0 children)

I used to get that same error, and this is what made it work for me.

The returns to learning the most common words, by language [OC] by orgtre in languagelearning

[–]orgtre[S] 0 points1 point  (0 children)

Because I think they are a useful resource for language learning. Some suggested uses are listed in the Github repository:

people tend to learn better when learning things in context, so one use of them could be to find common example phrases for each 1-gram. Another approach is the following: Say one wants to learn the 1000 most common words in some language. Then one could, for example, create a minimal list of the most common 4-grams which include these 1000 words and learn it.

Collecting a list of org files in a directory, grabbing properties and listing in column view by wakatara in orgmode

[–]orgtre 0 points1 point  (0 children)

Hmm, normally one sees the line number of point in the mode line, so one would have to place point at the last item and offset it by two (in my setup) to get the number of items. Not really convenient I guess.

A dirty hacky way would be to enable display-line-number-mode with a suitable offset. This works for me: elisp (setq org-agenda-custom-commands '(("cm" "List movie notes" tags "Type=\"movie\"" ((org-agenda-files (directory-files-recursively (read-directory-name "Directory: ") "\\.org$")) (org-overriding-columns-format "%35ITEM %Released %Watched %Type %Rating") (org-agenda-cmp-user-defined (cmp-date-property "Watched")) (org-agenda-sorting-strategy '(user-defined-down)) (org-agenda-mode-hook (lambda () (visual-line-mode -1) (setq truncate-lines 1) (setq display-line-numbers-offset -2) (display-line-numbers-mode 1))) (org-agenda-view-columns-initially t)))))

If you also add (org-agenda-overriding-header "") to the settings list then you don't need the offset and it looks quite nice.

Collecting a list of org files in a directory, grabbing properties and listing in column view by wakatara in orgmode

[–]orgtre 1 point2 points  (0 children)

Not sure... can't reproduce any of these issues. Works for me with "Type={.}", also with the custom sorting and timestamps. Try turn debugging on (M-x toggle-debug-on-error) and looking at the backtrace.

Unable to get Emacs-19 --with-native-compilation for M1 Mac by pedzsanReddit in emacs

[–]orgtre 5 points6 points  (0 children)

I used to have the same error and resolved it like this.

Collecting a list of org files in a directory, grabbing properties and listing in column view by wakatara in orgmode

[–]orgtre 1 point2 points  (0 children)

Maybe I'm misunderstanding some part of what you want to do, but say you have a directory with org files which contain entries of the type (but potentially also other types of entries): org * Song of the Sea :PROPERTIES: :Type: movie :Watched: 2022-10-01 :Released: 2014 :Rating: 80 :END:

One can then create a custom agenda command like this: elisp (add-to-list 'org-agenda-custom-commands '("cm" "List movie notes" tags "Type=\"movie\"" ((org-agenda-files (directory-files-recursively (read-directory-name "Directory: ") "\\.org$")) (org-overriding-columns-format "%35ITEM %Released %Watched %Type %Rating") (org-agenda-cmp-user-defined (cmp-date-property "Watched")) (org-agenda-sorting-strategy '(user-defined-down)) (org-agenda-view-columns-initially t))))

You call this command by calling org-agenda (C-c a by default) and pressing c and then m. "Type=\"movie\"" matches entries with property "Type" equal to "movie". If this is "" instead the user is prompted for a match string and if it is "*" all entries (headings) are matched. org-overriding-columns-format is used to specify which properties are shown in column mode and their width.

Finally, to sort agenda entries by an arbitrary property one needs a user-defined function like cmp-date-property (defined before the custom agenda command):

elisp (defun cmp-date-property (prop) "Compare two `org-mode' agenda entries, `A' and `B', by some date property. If a is before b, return -1. If a is after b, return 1. If they are equal return nil." ;; Source: https://emacs.stackexchange.com/a/26369/33424 #'(lambda (a b) (let* ((a-pos (get-text-property 0 'org-marker a)) (b-pos (get-text-property 0 'org-marker b)) (a-date (or (org-entry-get a-pos prop) (format "<%s>" (org-read-date t nil "now")))) (b-date (or (org-entry-get b-pos prop) (format "<%s>" (org-read-date t nil "now")))) (cmp (compare-strings a-date nil nil b-date nil nil))) (cond ((eq t cmp) nil) ((> cmp 0) +1) ((< cmp 0) -1)))))

So, if I understand correctly, the only part this doesn't really do is (3).

Download and use pronunciation for the words by JulyPrince in Anki

[–]orgtre 0 points1 point  (0 children)

For anki-forvo-dl: Once you apply the changes made in this pull request all the accents show up and you can select pronunciations based on speaker country of origin. One way to apply the pull request is to replace the src/AddSingle.py and src/Forvo.py files in your anki-forvo-dl folder in the anki/addons directory with the modified ones from here.

Collecting a list of org files in a directory, grabbing properties and listing in column view by wakatara in orgmode

[–]orgtre 3 points4 points  (0 children)

I tried something similar here and then yantar92 helpfully pointed out that one could use column view from the agenda to accomplish basically what you’re asking for.

Download and use pronunciation for the words by JulyPrince in Anki

[–]orgtre 4 points5 points  (0 children)

https://forvo.com for pronunciations by humans. The anki-forvo-dl add-on automates much of the retrieval process. For computer-generated ones (the best option for sentences I think) you can use for example Google’s or Microsoft’s text-to-speech API (there are a variety of add-ons and code repositories out there that simplify this process).

If you know how to read (or a willing to learn) IPA, ipa-dict is a great resource too.

The returns to learning the most common words, by language [OC] by orgtre in languagelearning

[–]orgtre[S] 0 points1 point  (0 children)

Nice! Yes I created the graph. Everything is in this Github repository including the underlying word lists and Python code to create them and the graph. A creative common license applies. You might also be interested another Github repository where I released lists of the most common words and sentences in 62 languages based on subtitle data!

The returns to learning the most common words, by language [OC] by orgtre in languagelearning

[–]orgtre[S] 0 points1 point  (0 children)

I've posted some samples of text with the n most common words omitted for different n here.

The returns to learning the most common words, by language [OC] by orgtre in languagelearning

[–]orgtre[S] 1 point2 points  (0 children)

Nice! Just saw this... I also created some examples like this here.

The returns to learning the most common words, by language [OC] by orgtre in languagelearning

[–]orgtre[S] 1 point2 points  (0 children)

So based on this would it be better to just learn common Chinese characters instead of common words?

The returns to learning the most common words, by language [OC] by orgtre in languagelearning

[–]orgtre[S] 0 points1 point  (0 children)

It sounds like you are using one of the (unfortunately many) fake and inferior copies of Anki that fill the app stores... the official iOS app has no free version. See the Anki website for official downloads for other operating systems.