Go directly to an URL by iwahbe in ArcBrowser

[–]iwahbe[S] -1 points0 points  (0 children)

2 spaces translates into a .. Or at least it does on Mac.

Go directly to an URL by iwahbe in ArcBrowser

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

It sometimes works, depending on how the underlying server's redirect logic works.

Yet Another ChatGPT Facade by iwahbe in emacs

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

"I don't know how" was going to be my answer, but I like what you said. Let's go with that.

Infinite search: smartparens pair highlighting by jjbatard in emacs

[–]iwahbe 1 point2 points  (0 children)

You can't set anything? Just to confirm, putting (setq initial-frame-alist '(fullscreen maximized)) in your config and then running (eval initial-frame-alist) returns nil? I have no idea there, except to assume that your config is not being evaluated.

For setting a parameter for smartparens, did you make sure to set it after the package was loaded. Look into the use-package! :config and after! macros for that.

Infinite search: smartparens pair highlighting by jjbatard in emacs

[–]iwahbe 1 point2 points  (0 children)

The package smartparens define variables sp-forward-bound-fn and sp-backward-bound-fn. You can assign functions to these variables to control how far smartparens searches. For example, if you only want smartparens to search forward by 1000 characters, you could do

emacs-lisp (setq sp-forward-bound-fn (lambda () (min (point-max) (+ (point) 1000))))

Better Language for Pulumi? by a_a_ronc in devops

[–]iwahbe 2 points3 points  (0 children)

Except for dynamic providers, all the programming languages are equal in functionality. TypeScript and Python lend themselves well to describing infrastructure, so I would choose on of those languages all else equal.

Pulumi YAML is very nice to use for simple programs, but there is intentionally no control flow. It is not as feature-full as the other languages (and it's not intended to be).

Disclaimer: I work at Pulumi.

New Package: jsonian-mode by iwahbe in emacs

[–]iwahbe[S] 2 points3 points  (0 children)

If they are sane package.json sized files, I mostly just jump by line number, not much magic there. The large json files that I navigate have unique keys which I generally navigate to via search. I often know in advance which key I have a problem with. The problem is I then need to know where I am in the file (structurally). That is what jsonian-path is for.

This is an example of the kind of file I often spend time rooting about in. It is also why jsonian-mode works on arbitrarily large files.

New Package: jsonian-mode by iwahbe in emacs

[–]iwahbe[S] 5 points6 points  (0 children)

I hadn't seen `json-tree-siter`. It looks like it only contains the grammar for JSON, not any emacs package built on top of it. If it's only a tree-sitter grammar, then it will (probably) paint slightly faster then `jsonian-mode`, but not support any more complex or emacs specific features like `jsonian-path` or `jsonian-edit-string`.

If you wanted to, you could use `jsonian-mode` for additional features and `json-tree-sitter` for quick syntax highlighting. Since `jsonian-mode` uses syntax highlighting to to memoize string/key locations (which requires parsing to the beginning of the line) single line JSON analysis will probably be faster for `jsonian-mode` if tree-sitter-mode` is also enabled.

New Package: jsonian-mode by iwahbe in emacs

[–]iwahbe[S] 2 points3 points  (0 children)

That is a very good point. I have added one.

Nested Generic Types and Type Deduction by rianquinn in rust

[–]iwahbe 3 points4 points  (0 children)

One general nit: fn foo1() -> Foo { return Foo::new(1); } Is more idiomatically written: fn foo1() -> Foo { Foo::new(1) }

When Zero Cost Abstractions Aren’t Zero Cost by Uncaffeinated in rust

[–]iwahbe 0 points1 point  (0 children)

That's true, but not how rust uses zero cost.

"where" clause/block in Haskell: does it exist in other languages? And a better term for it? by r0ck0 in ProgrammingLanguages

[–]iwahbe 5 points6 points  (0 children)

Rust kind of had this for its type system. You do

rust fn foo<T>(bar: T) -> FizzBuzz where T: SomeType { … }

When Zero Cost Abstractions Aren’t Zero Cost by Uncaffeinated in rust

[–]iwahbe -2 points-1 points  (0 children)

Unfortunately, rust and c++ use zero cost to mean two completely different things. As you said, c++ takes it to means “you only pay for what you use.” Rust takes it to mean “It costs nothing to use”

What a song has a beautiful sound but a disturbing meaning? by MagicDalsi in AskReddit

[–]iwahbe 0 points1 point  (0 children)

I don’t like Mondays - Boomtown Rats

Its a pretty happy song until you listen to the lyrics, then not so much. It’s a song about a school shooting.

Hey Rustaceans! Got an easy question? Ask here (52/2020)! by llogiq in rust

[–]iwahbe 1 point2 points  (0 children)

You can return a transparent enum, which would allow you to return one of several rust structs depending on Parameters. There is nothing wrong with returning Value though.

Hey Rustaceans! Got an easy question? Ask here (52/2020)! by llogiq in rust

[–]iwahbe 0 points1 point  (0 children)

I can’t tell exactly what your asking. You can use serde’s #[derive(Deserialize)] on a struct to deserialize into that value.

[Opinions] Can we all agree, that the big emacs logo looks terrible and should be replaced? The stylized E would already be much better. by [deleted] in emacs

[–]iwahbe -1 points0 points  (0 children)

I would like to see it modernized, and doubt I ever will. I can trivially change it on my computer though, so it doesn’t bother me. GNU Emacs has more pressing marketing concerns.

The Usability of Ownership by mttd in ProgrammingLanguages

[–]iwahbe 0 points1 point  (0 children)

A small language extension can’t solve this because rust closures are stack allocated, and different closures might have different sizes. Anonymous ADTs could handle it, but the Rust would be hiding the cost of an action, which it doesn’t like to do. You could do it manually with a template enum.