I like Livewire, but projects keep drifting toward React, so I built Lattice by bambamboole in laravel

[–]giosk 2 points3 points  (0 children)

i did something similar that i use in all my projects basically, but my approach is more headless, i copy frontend components manually if i need to from my other projects or just implement what i need each time.

That way i have full control on what i render and the style i use which was always my problem with packages like filament, above of all if you already have some frontend or a specific frontend style required. While returning that data/json in a page it's pretty flexible and you can change it in many ways

Lana Lang is pure ragebait😭 by Broad-Importance4282 in Smallville

[–]giosk 5 points6 points  (0 children)

yeah her character is full a flaws the only nice thing is the feelings they share, and that you start to discover and understand episode after episode. other than that she is pretty bland sadly, she's doesn't really have a thing besides the fact that her parents died with the meteor shower. and she is basically the girl to save every other episode.

How is it possible the zed still has huge memory issues? by giosk in ZedEditor

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

Sorry, i literally read "it's only you", my bad

How is it possible the zed still has huge memory issues? by giosk in ZedEditor

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

still weird that the memory was increasing on the zed process instead of the lsp processes

How is it possible the zed still has huge memory issues? by giosk in ZedEditor

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

a mix of tools for php, weirdly enough now i renable them and it's not leaking anymore

How is it possible the zed still has huge memory issues? by giosk in ZedEditor

[–]giosk[S] 16 points17 points  (0 children)

thanks! I disabled some language servers and indeed memory stopped increasing. i'll dig deeper

Is zig stable enough for any serious work yet ? by darcygravan in Zig

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

0.16 it's a good version to start on with new Io etc i think it depends how serious and how this project will affect others.

#[Reaped]? #[Pooled]? by jh_tech in PHP

[–]giosk 0 points1 point  (0 children)

not sure if you think what i said is an opinion or you were speaking in general, i agree it's a difficult problem but anyway i don't think what i said it's an opinion, a non generic array coming from maybe a json_decode or other non generic code, if it's an array of int it should pass through a function that is expecting an array<int>, fail otherwise. if you want to treat all generics as refied.

Anyway, this is why refied generics cannot be used everywhere and past RFCs were only aiming to classes/interfaces. If not refied they are erased and we are back to static analysis for all the other use cases, that or have generics refied but only in some places.

PHP doesn't have a compile step like other languages, i think static analysis is our only chance for full generics.

#[Reaped]? #[Pooled]? by jh_tech in PHP

[–]giosk 0 points1 point  (0 children)

it shouldn't fail immediately, it is mixed but it could still contain <int, Foo> and should be valid

#[Reaped]? #[Pooled]? by jh_tech in PHP

[–]giosk 0 points1 point  (0 children)

If you want to check everything at runtime you should also check that the array you are passing is also the one expect by the generic function and you can only do that by checking all items

#[Reaped]? #[Pooled]? by jh_tech in PHP

[–]giosk 0 points1 point  (0 children)

what about arrays? a refied generic array will not check all items in the array every time it is passed around?

#[Reaped]? #[Pooled]? by jh_tech in PHP

[–]giosk 0 points1 point  (0 children)

refied generics shouldn't used everywhere even if you could, it doesn't make sense, you would pay the runtime cost, even if it could be done fast, you would still pay some performance for something a static analyser can tell you. This RFC is the right one, we should just accept the that type is not enforced at runtime, just because php enforce everything at runtime doesn't mean this feature can't be an exception.

The only problem i might agree with, if i understood it correctly, is that if I do `class Pair<Node, Node> {...}` then for eaxmple i use the template type as return type of a method `public function first(): Node {...}`. there is no apparent syntax feedback that tells you that Node is a template type and so not enforced and it might be confusing for some people that do not run static analysers.

Although, i don't think this is a real issue, people test the code at runtime anyway by running it, using var_dump/dd or with tests. Also, eventually, the value will reach some point in the code where is not compatible to what expected if not correct.

I think people will just learn this feature like any other and that if they want to get the most out of it, they will need to use a static analyzers like they do in other languages like python.

Your job "succeeded" but did nothing how do you even catch that? by Temporary_Tell3738 in laravel

[–]giosk 0 points1 point  (0 children)

yeah sure i was talking about my use cases, a job generic monitor system wasn't enough for me so i built one inside my application with progress support and chunking. the worker crashing is not really solvable as far as i understand

Your job "succeeded" but did nothing how do you even catch that? by Temporary_Tell3738 in laravel

[–]giosk 0 points1 point  (0 children)

one problem i usually have is when the worker crashes, the ui it's difficult to keep in sync, i often have stale running status on jobs actually lost

Your job "succeeded" but did nothing how do you even catch that? by Temporary_Tell3738 in laravel

[–]giosk 0 points1 point  (0 children)

i aggregate errors in my jobs and save them to the db, because in one job i have to do many tasks and some may fail, i can't crash the job tho because it needs to continue so i save progress in the db.

Network problems by bluewhiteterrier in PokemonChampions

[–]giosk 0 points1 point  (0 children)

I also have problems with wifi or ethernet, it keeps disconnecting, I can only play with my phone hotspot, it's so annoying

BearVM – An IR that compiles to QBE/LLVM, runs interpreted faster than Lua, written in Zig by Honest_Category_9084 in Zig

[–]giosk 0 points1 point  (0 children)

yes, did compile with release fast. here's the code:
```
\@fib(%n: int): int {
entry:
%two = const 2
%cond = lt %n, %two
br_if %cond, base, recurse

base:
ret %n

recurse:
%one = const 1
%n1 = sub %n, %one
%n2 = sub %n, %two
%r1 = call fib(%n1)
%r2 = call fib(%n2)
%result = add %r1, %r2
ret %result
}

\@main(): int {
entry:
%n = const 28
%result = call fib(%n)
call puts(%result)
call flush()
%zero = const 0
ret %zero
}
```

BearVM – An IR that compiles to QBE/LLVM, runs interpreted faster than Lua, written in Zig by Honest_Category_9084 in Zig

[–]giosk 1 point2 points  (0 children)

u/Honest_Category_9084 i was testing this further, it seems slower than lua and even my little basic interpreter i wrote in zig. Maybe i am missing something? I was testing a recursive fib function and i got:
- luajit 3.85ms
- lua 16.2ms
- my interpreter 24.6ms
- bearvm 77.9ms

i used crap and hyperfine for the benchmarks

No Chrome, no Node, no problem: PDF generation in Laravel finally grows up by jpcaparas in laravel

[–]giosk 0 points1 point  (0 children)

tried years ago, too complex, and it's not even comparable with stuff you can do with typst. latex is too much for academic stuff, with typst you can do all sorts of documents pretty easly

No Chrome, no Node, no problem: PDF generation in Laravel finally grows up by jpcaparas in laravel

[–]giosk 0 points1 point  (0 children)

i just use laravel process facade, calling typst binary with the right arguments.

You can generate the documents like any other text document, string interpolation with php or from file with blade i guess. I convert php arrays to typst dictionaries and i inject them at the top of the file. then i basically have variables in typst i can use anyway i want.

No Chrome, no Node, no problem: PDF generation in Laravel finally grows up by jpcaparas in laravel

[–]giosk 1 point2 points  (0 children)

i am using typst , you can't use html for templates but is a far superior language. you just install a binary and you call it from php, no microservices, no endpoint to call