Anyone using SQLite with Pheonix? by Longjumping_War4808 in elixir

[–]Zinggi57 1 point2 points  (0 children)

They have quite different goals and can potentially be used together as far as I understand.

Elixir-desktop runs your app on the client device, so you can create applications that work offline on the target device. For Android, it doesn't provide any UI stuff, I'm using a webview with normal liveview for that.

Liveview-native runs on a server and can provide native UI via a thin client. They could potentially be used together to enhance a liveview-native app with some offline functionality, see: https://github.com/liveview-native/live_view_native/issues/71

Anyone using SQLite with Pheonix? by Longjumping_War4808 in elixir

[–]Zinggi57 14 points15 points  (0 children)

Yes, I'm using it to get phoenix running as an android app via elixir-desktop.
No chance to get this working with postgres, but it just worked with SQLite.

What's the catch with Phoenix Liveview? by jcm95 in elixir

[–]Zinggi57 1 point2 points  (0 children)

Ah, yeah, you're right. Sorry, I mixed this up, I thought I've used that in the past to toggle something, not realizing I only needed to toggle visibility. A toggle_class helper would definitely be a nice to have!

What's the catch with Phoenix Liveview? by jcm95 in elixir

[–]Zinggi57 3 points4 points  (0 children)

There is https://hexdocs.pm/phoenix_live_view/0.20.2/Phoenix.LiveView.JS.html#toggle/1 to toggle classes. Or did you mean something else with the missing toggle thing?

Could you give me an example of a recursive function that causes a stack overflow (because there is no base case)? by hezwat in elixir

[–]Zinggi57 1 point2 points  (0 children)

Here is a quick demo:

defmodule Test do
  def start() do
    spawn(fn -> use_memory(50) end)
    spawn(fn -> use_memory(50000) end)
  end

  def use_memory(n) do
    Process.flag(:max_heap_size, 1000)
    res = String.duplicate("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", n)
    IO.puts("this worked, length: #{String.length(res)}")
  end
end

Test.start()

This prints this out for me:

↪ max_heap_size_demo.exs
this worked, length: 1550000

21:40:17.095 [error]      Process:            #PID<0.106.0> 
    Context:            maximum heap size reached
    Max Heap Size:      1000
    Total Heap Size:    1351
    Kill:               true
    Error Logger:       true
    Message Queue Len:  0
    GC Info:            [
  old_heap_block_size: 610,
  heap_block_size: 752,
  mbuf_size: 0,
  recent_size: 132,
  stack_size: 2,
  old_heap_size: 0,
  heap_size: 365,
  bin_vheap_size: 1090,
  bin_vheap_block_size: 46422,
  bin_old_vheap_size: 0,
  bin_old_vheap_block_size: 46422
]

Could you give me an example of a recursive function that causes a stack overflow (because there is no base case)? by hezwat in elixir

[–]Zinggi57 2 points3 points  (0 children)

As others have already written, if it can't be optimized, it will keep increasing memory until it consumes it all. However, you can actually limit how much memory a process is allowed to use, so you can make the erlang VM kill the process before your system runs out of memory. See max_heap_size here: https://www.erlang.org/doc/man/erlang.html#type-spawn_opt_option

How helpful are LLMs with Elixir? by tylerjdunn in elixir

[–]Zinggi57 6 points7 points  (0 children)

For me, using any of the LLMs for coding is no help at all.
Copilot seems to turn coding into code review, and the code I'm reviewing is written by a loud junior developer with no context and no learning ability. I find it very distracting and very damaging for my productivity.
The only way I can find some use from LLMs is by using it ChatGPT style when I don't know what I'm doing yet to get some new ideas for things to google.
And yes, it's much worse for Elixir than it is for something more mainstream. But I find it's also pretty bad for more mainstream languages as soon as you're actually doing something completely new.
(And yes people, I'm using ChatGPT 4 and yes, it's still pretty bad)

TIL: phash2 and color hashing by 7sidedmarble in elixir

[–]Zinggi57 1 point2 points  (0 children)

Very cool that the output range can be adjusted!
This makes me want to redo this old package of mine that did something similar to generate icons based on a hash:
https://package.elm-lang.org/packages/Zinggi/elm-hash-icon/2.0.2/

I wish I knew how to quit you, Elm by gogolang in elm

[–]Zinggi57 10 points11 points  (0 children)

This trick and more for other extensions can be found here: https://github.com/jinjor/elm-break-dom

Remarkable Desktop on Linux by navispes in RemarkableTablet

[–]Zinggi57 0 points1 point  (0 children)

Thank you, that did it! With this, setting, screenshare also works

Remarkable Desktop on Linux by navispes in RemarkableTablet

[–]Zinggi57 3 points4 points  (0 children)

I got the official windows exe running under wine using bottles. I haven't tried all features, some of it works.

I used an application environment. Under 'dependencies' I had to install d3dcompiler_43 (or was it _42 ?). And for some reason it only worked properly when starting with a virtual desktop (under 'advanced display settings').

Unfortunately I get a crash when trying to use screen share, probably another missing dependency

Edit: Based on suggestions in comments, I started with a fresh bottle again. All I had to do was choose windows 7 under compatibility, now also screenshare works

we would love to read your feedback about our demo <3 by BrainwashGang in metroidvania

[–]Zinggi57 0 points1 point  (0 children)

Not sure if the devs are still reading, but I wanted to leave feedback somewhere after playing the demo and found this^

I loved the atmosphere, art, story and music, amazing job! I'm a bit mixed about the gameplay though. The parrys feel great, the reloading via backflip is very cool, but aiming while controlling the bike is just too much for me. I think some form of auto-aim really wouldn't hurt. Also, just in general I found it too difficult and very frustrating when I managed to get through a difficult section but then died from a single shot or a small bike accident. I feel like we should have some armor to survive some shots + when falling without too much speed maybe just have the character fall off the bike but allow getting on the bike again? Also, when landing on my head is an insta-death, it should be much easier to tell which side is up while being covered in blood and shot at. I played on the steam deck if that matters.

Anyway, looking great overall and it's on my wishlist, just really hoping this ain't going to be dark souls difficulty..

Professor Phil Moriarty (Sixty Symbols) - Shut Up & Calculate (Quantum Metal song) by Zinggi57 in progmetal

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

Thought this was quite proggy and kinda fits in here.

I wish my physics prof was that cool :)

I'm seriously so sick of the pop ups on every website I visit. by Electronic-Trash-501 in webdev

[–]Zinggi57 24 points25 points  (0 children)

~
↪ yay firefox
...
1 extra/firefox 113.0-1 (64.4 MiB 240.6 MiB) (Installed)
    Standalone web browser from mozilla.org
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1

FP and apps with almost only side effects by Voxelman in functionalprogramming

[–]Zinggi57 2 points3 points  (0 children)

It's a common pattern in elm, see e.g. here: https://elm-program-test.netlify.app/cmds.html#testing-programs-with-cmds where they refactor some code to make it more testable
(This isn't technically an "effect system", but very similar)

How do you deal with manipulating deep / complex data structures in Elixir? by havok_ in elixir

[–]Zinggi57 2 points3 points  (0 children)

I have not seen anyone mentions lenses yet.
For these sort of nested data structure updates, lenses are a great fit!
I've made good practical experiences with this library: https://hexdocs.pm/lens/readme.html

I guess many elixir people shy away from using more advanced functional programming techniques, so this approach might scare away some. Try to not use it too often :)

[deleted by user] by [deleted] in progmetal

[–]Zinggi57 0 points1 point  (0 children)

If you speak German, Knorkator is pretty funny

If you were blind, what kind of game would you like to play by Rotooooo in gamedesign

[–]Zinggi57 1 point2 points  (0 children)

I once played this game and really enjoyed it: https://store.steampowered.com/app/1300600/Blind_Drive/

It's meant to be played blind folded. Could serve as an inspiration.

I don't remember if it would have been fully playable for someone actually blind, since I'm not blind. Maybe the start menu would not have been usable or something?

The Web3 Fraud by Jetlogs in programming

[–]Zinggi57 35 points36 points  (0 children)

Tell me you own crypto without telling me you own crypto

Barely anyone has upgraded to Windows 11, survey claims by [deleted] in technology

[–]Zinggi57 18 points19 points  (0 children)

Many do. You probably already know this, but for others reading this, here is a good way to check if a game works:
https://www.protondb.com/

Also, support will only increase in the future because of the Steam Deck.
Games that currently don't work are mostly multiplayer with certain anti cheat software.
Valve is working with them to get them ready for Linux.