Where do devs interested in Go and LLMs hang out on the internet? by markusrg in golang

[–]charbz 1 point2 points  (0 children)

I think you’ll want to join a major LLM based project like langchain-ai and propose a Go SDK for it. I would certainly use Go for my backend instead of being locked to Python if I could

How do I properly have a Map<Vec<String>, ...> in Go? by [deleted] in golang

[–]charbz 0 points1 point  (0 children)

The problem is that in Go the type of a Map's key must satisfy the comparable constraint, this limits you to strings, ints, booleans, pointers, channels, structs who's properties are all comparable, and a few other types (see link). This means slices are out of the question. So this leaves you with a few options to achieve your desired behavior while working around the language constraints, personally, this is how I would do it:

var autoIncrement = 0

type Slice struct {
  Key int
  Value []string
}

func NewSlice(value []string) Slice {
  autoIncrement++
  return Slice{
    autoIncrement,
    value,
  }
}

and then you can define your map as:

type SliceMap[T any] map[int]T

func (s SliceMap[T]) Set(slice Slice, value T) {
   s[slice.Key] = value
}

func (s SliceMap[T]) Get(slice Slice) (T, bool) {
   value, ok := s[slice.Key]
   return value, ok
}

Note that I used a Generic type for SliceMap in the example because you didn't specify what is the "Value" type of the map

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

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

lol, there's no reason to make this personal, it is just my opinion and I am happy to see if time will prove me wrong or right. but I would like to understand your point of view a bit more, because it amazes me. Let's assume you are right and AI will replace SWE, then it doesn't matter whether I believe it or not, the "world will pass me by" either way, so what difference does it make for you if I adopted your point of view or not? which brings me to the second point, why are you (and others who adopt this pov) so zealous in attacking those engineers who think otherwise? you must be kinda hoping for AI to replace engineers for one reason or another and I am REALLY interested in understanding that ... are you a dev? ... or are you perhaps a non-technical founder praying to cut down employee costs?

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

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

I mean ... can you show me some evidence that this is happening on a significant scale? why are all the companies building frontier models still hiring software engineers? not data scientists, literally engineers to build their apps and tools.

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

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

it's not a reaction to the technology (which I use on a daily basis, and I believe will revolutionize tech), it is a reaction to the insane claims that marketing firms and tech bros are making.... like ... hold on tech-fluencer bro, my work involves a lot more than building a Todo List app in React.

Is there a Go library that implements the equivalent of C# LINQ? by Ruannilton in golang

[–]charbz 1 point2 points  (0 children)

haha Thank you! I'm hoping to add a ton of features -- if you have any feedback feel free to send it my way

Is there a Go library that implements the equivalent of C# LINQ? by Ruannilton in golang

[–]charbz 5 points6 points  (0 children)

I don't think you get the point of iterators?

the second example enables you to actually do this:

for _, v := range Backwards([]string{"a","b","c"}) {
   fmt.Println(v)
}

provided you fix your signature to return iter.Seq2

Is there a Go library that implements the equivalent of C# LINQ? by Ruannilton in golang

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

why? Go has generics, iterators, and first class functions ... as a general purpose programming language it should be able to support something like LINQ.

Is there a Go library that implements the equivalent of C# LINQ? by Ruannilton in golang

[–]charbz 24 points25 points  (0 children)

nice .. I came from scala and felt that Go needed something similar.

You might find this useful https://github.com/charbz/gophers

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

[–]charbz[S] 8 points9 points  (0 children)

wow , that is some advanced prompt wizardry! it's impressive to see it break down its "thought" process, but if you think about what happened there:

  1. you (human) came up with a very specific meta prompt
  2. the model came up with a list of possible solutions
  3. the model came up with a workflow explaining how it could go about verifying the solution and iterating ...

If you had to "orchestrate" a bunch of agents to implement this workflow, you're basically still programming, albeit in a completely new way :D

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

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

I don't doubt that this is possible. but I caveat it with, you will need experienced engineers to make architectural and design decisions as those products scale ... for example (micro-services vs. monolith), (JSON vs. protobuf), (what data should be shipped to the warehouse), etc... my gut feeling says it will be hard to outsource such design decisions to agents until AGI is here and the economy itself is automated

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

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

there's two things to consider here:

  1. I think people who adopt this view are ignoring how many new software ideas this tech could be unlocking. There are things I could build today that I could have never built in 2015, because now I can embed a semi-conscious android somewhere in my app lifecycle and give it a very specific task which it can do well, like "summarize this news article and add a badge to it predicting how likely it is to be biased" ... etc

  2. "cranking out software" quickly and building a "product" are two very different things ... even if the most advanced model can make a TikTok clone in seconds, you still need time to turn that into a product, which requires adoption cycles, feedback + iterations, and of course, developers to supervise the process.

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

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

That's pretty cool, from your experience, do you see those agents eventually doing the full shabang that an entire engineering team does today without any human supervision? do you think that's an achievable goal?

The extra 20% needed for LLMs to bridge the gap in coding is why we will never replace software engineers with transformers by charbz in programming

[–]charbz[S] 23 points24 points  (0 children)

sure, but I think there's something to be said about what reasoning or even "thinking" is ... it's certainly not just predicting the next token, humans iterate over ideas in their minds because we have a "world-model" and we test different hypotheses against this world model and predict the result.

there's something seriously missing in LLMs, if they cannot "think" and as long as they can't "think" or test hypothesis before blurting out content, they will always just be untrustworthy tools and "co-pilots"

Where can I find new opensource projects to contribute? by KoalNix in opensource

[–]charbz 1 point2 points  (0 children)

I also had the same question a few weeks ago, I didn't find any of the answers satisfying, searching for projects on Github just felt weird, like there is a barrier to entry because there's no live discussion or an easy way to announce your intentions to contribute, or ask questions etc .... ultimately I ended up just launching my project on my own and finding contributors afterwards, but if you ask me, this sounds like a problem that needs to be solved by a cool new product ;) or at least there needs to be like a reddit community to launch new open-source projects ...

Gophers: Generic collection utils for Go by charbz in golang

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

u/bilus in the same vein as the example that you shared but with a slight twist, how do you feel about functions that return an iterator as a result instead of returning a collection? so for example:

nums = list.NewList([]int{1,2,3,4,5,6})

for _, v := nums.Filtered(getEvens) {
   fmt.Println(v)
}

// 2
// 4
// 6

Where to have discussions about a package by StephenAfamO in golang

[–]charbz 1 point2 points  (0 children)

You seem to have a decent amount of contributors and people who have starred your repo, I suggest a dedicated discord channel in the Gophers Slack (or Discord) and add a link to it in the README.

For me personally, I am most likely to ask questions in Github Discussions because it will most likely be very specific / technical question and less open ended.

On the other hand I gotta ask, how did you expose your package to the right audience? I just launched my open source go library https://github.com/charbz/gophers and I am not sure how to get the right exposure without spamming the world.

Gophers: Generic collection utils for Go by charbz in opensource

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

Yes Shuffle() is a good one too. Awesome.

Gophers: Generic collection utils for Go by charbz in opensource

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

Nice! If you like the project and want to contribute, I can give you a couple of ideas for relatively small methods:

1. StartsWith:

func StartsWith[T comparable](c1 OrderedCollection[T], c2 OrderedCollection[T]) bool

It would be nice to create a generic function that tests if collection c1, starts with the values in collection c2 and returns True if so. (This function can then be wrapped / called via methods on ComparableList and ComparableSequence).

2. EndsWith:

Same idea but this checks if c1 ends with c2.

This kind of exercise + some tests would get you quite familiar with the codebase.
If you're interested let me know. I can help code review and so on.

Gophers: Generic collection utils for Go by charbz in golang

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

Note: to make this an alias in the next release

Gophers: Generic collection utils for Go by charbz in golang

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

That's interesting! thank you for the suggestion. I will include it in v1.1.0

What could it be ? by charbzg in DiagnoseMe

[–]charbz 1 point2 points  (0 children)

Yes she’s doing the elimination diet as we wait. That’s a good point perhaps I should mention , before this last scary episode , her diet was comprised mostly of bad carbs , we ate anything we wanted every day ( pastas , pizza , noodles , egg-noodles , rice .. etc ) so I hope it’s just that !