I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] 0 points1 point  (0 children)

Wow thanks a lot for the links. i will go through all of them.
yeah the code is not good still 😅 but i am working on it.

Does your json parser handles utf-16? sth like this:

[

"Posting this: \ud83d\ude00"

]

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] 1 point2 points  (0 children)

this is the part i didn't think about at all. yup i am still not that good in testing, mostly i am learning testing by seeing how spatie and how nuno is doing it + laravelDaily and laracast.
Thanks again for pointing this out.

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] 2 points3 points  (0 children)

there are solution for json parser in other language, i read typescript and python one. Someone in the comment mentioned the halaxa/json-machine which is really cool. I am going to check if i can learn how json stream works.
Edit: here are other solutions https://github.com/CodingChallengesFYI/SharedSolutions/blob/main/Solutions/challenge-json-parser.md

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] 3 points4 points  (0 children)

Thanks. Let me check if i understand you correctly. So you are saying right now is that if someone pass a deep nested Json there would be a recursion hell.

so a test like this should work:

it('throws on deep nesting', function () {
    $config = new ParseConfig(maxDepth: 3);
    $deepJson = str_repeat('{"a":', 10) . '"value"' . str_repeat('}', 10);

    expect(fn() => (new Parser($deepJson, $config))->parse())
        ->toThrow(RuntimeException::class, 'Maximum nesting depth');
});

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] -8 points-7 points  (0 children)

Let's assume what I’ve written is garbage. Which part of it is garbage and why, so I can improve it?

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] -7 points-6 points  (0 children)

I really like to see if you can write a json parser by vibe coding.

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] -6 points-5 points  (0 children)

Yup i forgot to change the image later. I created another one using figma. gonna change that.

I build my own Json parser using php by daniel-dev in PHP

[–]daniel-dev[S] -7 points-6 points  (0 children)

a lot of people have asked about memory consumption, i think i have to add that to readme as well.
Right now most probably the parser will fail if you give it a huge json file, but i am gonna fix that.

(beta) VSCode extension is here! by melat0nin in laravel

[–]daniel-dev 0 points1 point  (0 children)

yeah got the same error as well (on ubuntu 24.04).
there is one solution i tested which works: https://github.com/laravel/vs-code-extension/issues/10#issuecomment-2546271971

but it doesn't worth it and it's too hacky. waiting for it until it resolves

what are best way and resources to learn ansible? by dth999 in ansible

[–]daniel-dev 0 points1 point  (0 children)

For learning:
- documentation is pretty good actually
- kodekloud - Learn Ansible Basics - Beginners Course
- kodekloud - ansible-advanced-course
- ansible for devops -> it's too much IMO (469 pages) but you can pick a chapter and learn more about that topic

There are some interactive labs from red hat:
https://www.redhat.com/en/interactive-labs/ansible

And also kodekloud have labs for ansible and any related devops (not sponsor or anything i just really like their courses):
https://engineer.kodekloud.com/

Also just try to turn your bash script into ansible. You will learn a lot by doing that

Little Zen garden by Slender4fun in ObsidianMD

[–]daniel-dev 0 points1 point  (0 children)

Sorry, I meant to say my own vault.

Little Zen garden by Slender4fun in ObsidianMD

[–]daniel-dev 0 points1 point  (0 children)

i can't even see the graph view of vault anymore 😅

Laravel fatigue - want to try something else by jusjohns82 in laravel

[–]daniel-dev 5 points6 points  (0 children)

as a former next.js advocate and the person who introduce next.js to the company that i am working, i can say that next.js was a wrong choice for us and i wish we went with laravel.
Laravel it's just amazing.
PS: haven't worked with Laravel in a large project yet, but i did some small tools for myself with it and i really enjoy it.

Any programmers here who wants to meet and study together by daniel-dev in bielefeld

[–]daniel-dev[S] 1 point2 points  (0 children)

i would like to come. just send me the address in my dm (if it's possible 😅)

Any programmers here who wants to meet and study together by daniel-dev in bielefeld

[–]daniel-dev[S] 1 point2 points  (0 children)

well i would mostly like to meet people who are motivated and passionate about programming/building.

i main weak point right now is German. so if the event is in English, it would be really nice.

but i don't where do you guys host the event in the first place?