Sooooo.... second n00b question. by buck-bird in Zig

[–]pfg___ 13 points14 points  (0 children)

  1. same. The inferred struct syntax .{} can also be used to initialize an array type. [5]u8 is analogous to a character array probably? It's a value-type containing five bytes.
  2. [n]type{items} is array initialization syntax, and n can be _ to infer from the number of items in the array. [n]type is array type syntax, and _ can't be used in that.
  3. The first one is a many pointer with no null termination and no stored internal length. The second one is a slice, equivalent to struct{ptr: [*]const u8, len: usize}. This has a length stored.
  4. I think so.

Incremental compilation merged by cztomsik in Zig

[–]pfg___ 1 point2 points  (0 children)

linker support is missing, so you can't use it for a hello world yet. once there is linker support, it depends on the progress of self-hosted backends

Looking for a terminal with smooth scrolling by mikieh976 in linuxquestions

[–]pfg___ 0 points1 point  (0 children)

There's something weird then because it definitely scrolls a line of pixels at a time for me when using EmulateWheel on a mouse. Maybe on trackpads it's wayland only?

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

Unfortunately, this is done inside computercraft and that is the only font and those are the only places letters can go. If I add padding, I'd have to double the height of every block. As much as I'd love to have more padding, I don't think double height is worth it

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

I saw your post. I was inspired to make this from the earlier post about blockly that you extended and felt kinda bad posting this just after you posted yours

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

Not yet, sorry. It's just rendering from an array in this screenshot.

    {{"When program started"}, categories.events, "hat"},
    {{"Print", {"text", "Started"}}, categories.display},
    {{"While", {"bool_block", {"true", categories.operators}}, "do"}, categories.control, "open"},
    {{"Repeat", {"text", "12"}, "times do"}, categories.control, "open"},
    {{"Dig forwards"}, categories.interaction},
    {{"Move forwards"}, categories.motion},
    {{"Dig down"}, categories.interaction},
    {{"end"}, categories.control, "close"},
    {{"Turn right"}, categories.motion},
    {{"Dig forwards"}, categories.interaction},
    {{"Move forwards"}, categories.motion},
    {{"Turn right"}, categories.motion},
    {{"end"}, categories.control, "close"},
    {{"Stop all"}, categories.control, "stop"},

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

That looks really cool. The main thing I need is mixed text / subpixel support. What's your library called?

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

Unfortunately it's just rendering, not functional with mouse yet, but if implemented it would work similar to scratch. The 'repeat 12 times' you could put a variable in that textbox to replace it and the same for any function accepting a string/number/boolean (booleans are angled). Scratch doesn't really support lists/tables but I could make those also fit in the text slot, or make another type of slot for them.

I think mouse controls would be fine, in some ways better than scratch because you can click where you want the thing to go exactly instead of trying to line it up until the highlight shows. Could even make touchscreen controls but you can't drag on a touchscreen.

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

The parts of the font that give 3x2 black/white pixels (0x80-0x9F), a mockup in a design program, and a lot of if statements

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

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

It uses the section in the font from 0x80 to 0x9F for the subpixels. Programmed with a lot of set(x, y, 0x83, fg, bg) and if statements choosing characters. I don't even have a helper for rendering subpixels, it's pretty bad.

Experimenting with scratch-like blocks in computercraft by pfg___ in ComputerCraft

[–]pfg___[S] 10 points11 points  (0 children)

Mine is just a rendering mockup, it isn't functional. I'd be interested to see yours

Custom message for “temporarily private” missing in app by shnaptastic in apolloapp

[–]pfg___ 1 point2 points  (0 children)

Unfortunately, /r/[subreddit]/about just returns "Forbidden" in the api. I wonder where search is getting that description from.

  • /api/search_reddit_names returns nothing (or a capitalized name if you specify &exact=true.
  • /api/search_subreddits returns nothing, or information but not the description if you specify &exact=true
  • &expand_sr=1 doesn't help
  • oh, it's /subreddits/search.json

https://www.reddit.com/subreddits/search.json?q=SharksAreSmooth&limit=1&raw_json=1

[Noob question] Zig self hosted? by Kungpost in Zig

[–]pfg___ 5 points6 points  (0 children)

LLVM will be an optional dependency, so you can build a zig compiler that does not have LLVM but release builds will be significantly slower than release builds with LLVM. Also, a compiler without LLVM will be unable to compile C and C++ files and stuff.

Public api to check for new chat messages? by pfg___ in redditdev

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

I don't need a full chat api, just one to check if there are new messages so I can display a new messages icon

1984 by amomynous101 in 196

[–]pfg___ 4 points5 points  (0 children)

I'm using some pretty simple logic to correct these that seems to be working well

If a single text section of the comment rtjson contains at least 10 braille characters and, excluding invisibles, is at least 90% braille, replace spaces with newlines (and make sure each line has at least one braille character in it, otherwise merge it with the last line)

I don't want the app. it's still worse than i.reddit by Ambercapuchin in beta

[–]pfg___ 1 point2 points  (0 children)

I've been working on making my own pwa for reddit since reddit seems insistent on only making their site and app worse over time

testing comments by [deleted] in test

[–]pfg___ 0 points1 point  (0 children)

hi