the pr is here if you want https://github.com/Together-Java/JShellPlaygroundBackend/pull/27
#JShell project for Tj-Bot!
1 messages · Page 3 of 1
i have issues with antivirus
curl --request POST \
--url http://localhost:8080/jshell/eval/test \
--data '2+2'
try this as first request
Ah ? Maybe because of the debugguer ? Maybe because of docker ?
i tried to apply the generateapidoc command
it seems that the antivirus doesn't trust the source
so i get connection timeout error
please first make it work instead of trying to do swagger stuff
use this @bright lark
ah !
{
"timestamp": "2024-07-30T23:31:20.960+00:00",
"status": 409,
"error": "Conflict",
"message": "Session may have been forcibly destroyed.",
"path": "/jshell/eval/test"
}
this is probably due to docker container
im checking
What did you do ?
i ran spring boot locally
show the images in your docker please
ran the command
./gradlew :JShellWrapper:jibDockerBuild
do docker ps
do you have some log in the api ?
o.t.j.service.JShellSessionService : Scheduler heartbeat: sessions ready to die: []
2024-07-31T00:34:46.330+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: started.
2024-07-31T00:34:46.330+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: sessions ready to die: []
2024-07-31T00:35:46.328+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: started.
2024-07-31T00:35:46.328+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: sessions ready to die: []
2024-07-31T00:36:46.337+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: started.
2024-07-31T00:36:46.337+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: sessions ready to die: []
2024-07-31T00:37:46.323+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: started.
2024-07-31T00:37:46.323+01:00 INFO 19224 --- [pool-2-thread-1] o.t.j.service.JShellSessionService : Scheduler heartbeat: sessions ready to die: []
do i have to use docker-compose to run ?
try to run this sagain
no
why there is no command to run the container ?
wdym
run the image
which image ?
there are at least two images in this project
PS C:\Users\firas\Documents\workspace\JShellPlaygroundBackend> docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
togetherjava.org:5001/togetherjava/jshellwrapper master 4781b5bdf10f 8 minutes ago 343MB
but u said that i only need docker for jshellwrapper
yes
i could run springboot locally without docker
yes
so 1 image
yes
alright how to run jshell as container?
did you run this ?
it works
ah ?
show the output
i don't know why earlier it didn't work
{
"snippetsResults": [
{
"status": "VALID",
"type": "ADDITION",
"id": 1,
"source": "2+2",
"result": "4"
}
],
"abortion": null,
"stdoutOverflow": false,
"stdout": ""
}
I don't know either since you didn't share anything about what you sent
yep
ive use the endpoint in postman
like the one u gave
well if the issue reappars, i'll let u know
right
so it works 🙂
perfectly
alright, now i see what it is
note that it creates a session
that lasts 30 minutes
so if you send additionnal snippets
it will be one the same session
which means that you can use snippets endpoint to get the list of snippets
id is test here
"message": "Id 1 doesn't match the regex [a-zA-Z0-9][a-zA-Z0-9_.-]+",
"test" ?
the id is at the right of the eval
well
it's the id of the session
.../snippets/test
and you will get the snippets of session test
- note that there is an additional parameter that you can give to the eval endpoint, where you can specify the code of startup script, you can try for example CUSTOM_DEFAULT
- there is also an additional parameter on the snippets endpoint where you can specify if you want to include the startup script
(we need to write these information)
- there is also a startup_script endpoint, where you can check the content of the startup script
- there is also a single-eval endpoint where you can eval a script without creating a session
- ah and I forgot, but you can omit the id on the eval endpoint, in such case it will generate a random one
- and finally, a delete endpoint where you can force delete a session
it's written, kinda, not up to date, in the readme of the api
and swagger would help a lot I guess
anyway, play with it
if you have any question, ask me
So the bug happened again, but I forgot to add debug level -_-
So here are the logs, at least we have a bit more information, and I am going to restart it with the correct log level
@bright lark @sterile crest @compact holly
Alright, I restarted and used debug level, it is working
We will really need to simplify the api
Also
can anyone review this please https://github.com/Together-Java/JShellPlaygroundBackend/pull/26
Whatsp guys
Im in holidays
I'm following the progress
But can't develop anything
🏊♂️
Will come back in 4 days
Can I redo it then
I'll remove Spring and the rewrite the docker integration
Which is basically rewriting the entire thing nevermind
Might as well use my lambda that is currently running and hasn't gone down, is unrestricted, no bugs 
Why?
Simplify doesn't mean full refactor
Also, i like spring and i think it's helpful for rest api
What i dn't understand yet is: how discord communicates with rest api to fire actions
It doesn't
It uses web sockets
Jshell isn't a discord bot, it's an API for TJ bot
Yeah but if you couldn't understand that from the 5 java files doing that interaction then how can you say having spring is good?
I didn't take full look on the cosebase (jshel api)
But i assume it's possibel to simplify stuff
Spring is mature, spring boot is magic
What would u do without spring?
Then again, I don't really wanna have this conversation
If you wanna jerk off to spring go for it 🤷
anything I want 
it's the other way around
what would the spring do without me? 
Ever noticed that people don't use the tools provided spring?
Eureka? Lul they use consul
spring isn't that important argument atm
firas should take the engineering approach, take a deep dive at the code, get familiar, fix some bugs
and only then, to actually think and propose engineering solutions
with good argumentation
we are not just throwing random tech at projects
engineering is not about throwing random abstract ideas without any domain knowledge
like "hmm, about that bug.. what if we reworte the whole thing in rust?" is not helpful
even when you are knowledgeable, ideas are cheap
we all have a lot of cool ideas
it would be cool to have flying cars (via jet engines), that drive themselves with AI
what we are looking for are actual concrete engineering solutions, that someone is willing to implement
that satisfy all our requirements
(if you don't know the requirements, you can't even start thinking about the solution)
it would need to be a TJ project, we would have to know possible costs of using their infrastructure
and from my understanding it doesn't have the feature parity
and it having no bugs and not going down is expected, since it's not used in production
ala also thought his solution had no bugs and is not going down, so that is not that reassuring to me
but yeah, it's a possible solution we could migrate to
we should also analyze flexibility of such solution, currently we have a lot of freedom to do whatever we want
(we basically made aws lambas ourselves, on our own infrastructure, and sky is the limit)
It is used in prod
but good maintainability and reduced complexity, is something we tend to favor over flexibility
For another discord server
I've literally already cloned our jshell command
For another server
The better part is that everything is managed via the bot
And the jshell service is purely only used to invoke code in jshell
So you manage the sessions and all that jazz you wanna do in your own code and not externally (like in the jshellbackend)
And I can show you the price breakdown
It's free
But I have actual graphs n shit
DRY
repeating some slogan doens't help either
Yes we can employ these too
sounds good, would like to know more about it ^^
No I'm just saying random buzz words
To me spring boot helps
Sure wait
what do we lose on feature parity and flexibility?
are sessions a possibility?
that is a big feature, that you can just continue wth your personal repl session
handle it on TJ bot
what's a session really? Map of used commands?
the execution state?
explain what you mean by parity so i'm on the same page (i have a definition but wanna check its the same)
the only thing we might lose out on is history of execution
Hmm
e.g. if you did /jshell int i = 0; that won't persist
i'm aksing about all the drawbacks of the solution, so I can have the full picture ^^
that's the only downside
so can we just swap it without losing any current functionality?
just this ^^
i.e.
/jshell sysout(i)
wont work
yeah, history of execution
well it can if we internally keep a record of the history and anything that was successful re-run it each time
like you have in your own local jshell
so with each request provide the history
you can define something and use it later
yhhh
I dnt understand sir
define multiople methods, and then show helpee the difference
And this is too quick
but yeah, my position here is to play the devils advocate
so I want to know all the drawbacks and costs
to make sure we are making a sound decision
Wait please
We need to evaluate the current impl of session
I see it cool
Why would we change it?
yes, no worries, that's my job :p
curl --location 'https://vz7fbzekqnhroe6jh6zkx3akra0smlov.lambda-url.eu-west-2.on.aws/ ' \
--header 'Content-Type: application/json' \
--data '{
"code": "System.out.println(\"hello\");"
}'
output is:
{
"errorStream": "",
"outputStream": "hello",
"events": [
{
"statement": "System.out.println(\"hello\");",
"value": "",
"status": "VALID"
}
]
}```
we already have a working solution that we invested into, and we need a good reason for a rewrite and completely different solution
it's enticing and sexy, I just need to know the exact drawbacks :p
if it has drawbacks, it should be demonstrated somehow
please stop trolling
time?
1.2 seconds
Ah is it performance issue
time and persisted execution history is all i can see
no
well yes technically, but's a new docker container per request (if we compare it to the current implementation)
Gotta go to bathroom 🛀
Each time there is a discussion @sterile crest you start talking about your solution which we said we won't use and it goes into hundreds of message
Will come back
it's not just a new docker container
please stop flooding this channel
the beauty of docker containers is that they are just linux threads, there is no performance downgrade
only because you're butt hurt that you spent 6 months working on a feature that's still buggy 3 months later 😦
it's just a thread with some cgroups and namespaces to restrict it
but i get ittt
i would so use my thing for a /linux command
lambdas are kidna made for this type of thing
My point is that it's annoying that whenever someone start talking about the actual project, it then go into an off topic discussion about yours
it's so easy to maintain, since we don't maintain anything
so please stop
we outsorce the infra
like
nah, don't insult the current soluton either 
95% of messages here are about your project, that's not normal
it goes nowhere, and the solution is cool 
just create an issue where we can properly discuss it, all the points I mentioned
discord discussions lead to nowhere
can't blame it when nobody wants to talk about the current solution
which points ?
let me reminder that you just spouted 100+ messages just now where half of them are not related
nobody wants to talk about any solution :p
well, people only talk, that's the main issue
jshell issue was open for years
me and especially ala have put a long time into trying to fix the issues though
like with the logging
so can anyone review this ?
and that's appreciated 
yep 1 sec
but you are the only ones
Well, you are talking.
Me and Wazei are actually doing things 🙂
and you are here basically because you wanted to make it happen for ala birthday, because he was asking for it for months
because it's kinda complicated and nobody can really easily onboard on its dev
we have to be nice to ala man
And I am here because nobody would do it
yes, i'm just doing what my job here is
to make sure we make good engineering decisions
anyway
I don't have time for actual impolementation/review/tests
There are many improvments we can do in the implementation of the api
but I must have time when someone is proposing a rewrite and completely alternate soltuion
what
@timber mirage i approved ur PR but I don't think it'll help with anythign
to make sure our efforts are focused
/jshell-2 at least??
I told you, create an issue, cover all the points I talked about
and we will see
these discord discussions lead to nowehere
It will, tjbot will have a new command using this
So at any time, we can know which session is alive and since when, and we don't need to go to the vps
which points are you talking about ?
you would have to read the discussion
wazei read it, so he knows what i'm takling about
fix the conflict @timber mirage
@sterile crest note that on top of improving the API (I mostly think about the stop/close code which starts to be very complex for no reason)
We will need to fix docker problem because docker does some random stuff all the time, and the lib we are using makes it even worse
I'll do that later, I neeed to eat
it's not the lib itself, i think it's how we're using it
package com.javadiscord.bot.commands.linux.docker;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.CreateContainerResponse;
import com.github.dockerjava.api.model.HostConfig;
public class DockerContainerCreator {
private final DockerClient dockerClient;
public DockerContainerCreator(DockerClient dockerClient) {
this.dockerClient = dockerClient;
}
public CreateContainerResponse createContainerStarted(
String name,
String image,
long memoryLimit,
long memorySwapLimit,
int cpuShares,
long cpuPeriod,
long cpuQuota) {
CreateContainerResponse createContainerResponse =
createContainer(
name, image, memoryLimit, memorySwapLimit, cpuShares, cpuPeriod, cpuQuota);
startContainer(createContainerResponse.getId());
return createContainerResponse;
}
public CreateContainerResponse createContainer(
String name,
String image,
long memoryLimit,
long memorySwapLimit,
int cpuShares,
long cpuPeriod,
long cpuQuota) {
HostConfig hostConfig =
HostConfig.newHostConfig()
.withAutoRemove(true)
.withInit(true)
.withMemory(memoryLimit)
.withMemorySwap(memorySwapLimit)
.withCpuShares(cpuShares)
.withCpuPeriod(cpuPeriod)
.withCpuQuota(cpuQuota);
return dockerClient
.createContainerCmd(image)
.withHostConfig(hostConfig)
.withStdinOpen(true)
.withName(name)
.exec();
}
public void startContainer(String containerId) {
dockerClient.startContainerCmd(containerId).exec();
}
}```
package com.javadiscord.bot.commands.linux.docker;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.ExecCreateCmdResponse;
import com.github.dockerjava.core.command.ExecStartResultCallback;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
public class DockerCommandRunner {
private final DockerClient dockerClient;
public DockerCommandRunner(DockerClient dockerClient) {
this.dockerClient = dockerClient;
}
public OutputStream sendCommand(Session session, String command) throws InterruptedException {
session.updateHistory(command);
OutputStream output = new ByteArrayOutputStream();
ExecCreateCmdResponse execCreateCmdResponse =
dockerClient
.execCreateCmd(session.getContainerId())
.withAttachStdout(true)
.withAttachStderr(true)
.withCmd("bash", "-c", command.trim())
.exec();
dockerClient
.execStartCmd(execCreateCmdResponse.getId())
.exec(new ExecStartResultCallback(output, output))
.awaitCompletion();
return output;
}
}
that's literally all it is
2 files
all we need
Often when a container is destroyed, for example, random stuff happen with the lib
Like for example the error from last time
but it's not the only one
yeah that could be specific though which I haven't seen personally - so I can't speak on that
but like our code has too much happening is where i'm pointing at
because sometime an error appear in a docker lib thread so there is no way we can do something for it
my code above to create a container is 100x less complex than what instan did
create a pr then please
it was a big refactor i was gonna but it's kinda involved
i rather we debug and fix now
which is why i said i rather re-do the spring and docker implementation
but it's a massive piece of work
even the spring bit, if it was a bit more OOP then maybe but it's a mess rn
hard to approch
so the trade off isn't worth it at this moment
might be worth it once we know jshell is 100% working without bugs
then we can improve
but its also why i say go use lambdas because then we can remove that heavy lifting logic entirely and focus on the feature itself
but that won't happen now
it's a step backwards to go in the right direction but too many opinons
i don't even know where this code comes from
yeah, what i'm saying I don't what your /lunux poc is, I assume your jshell implementation on another bot
that uses docker, and which api?
it's running a 5min linux session in discord
i mean
i did it for #server-suggestions message
but you guys didn't want it
so i donated it 😄
here's the code if u want it
here's the jshell using lambda example in a discord bot: https://github.com/javadiscord/lj-discord-bot/tree/main/src/main/java/com/javadiscord/bot/commands/jshell
the POCs are all there
it's not that I didn't want it, it's just that im the final boss you have to beat to have your idea implemented
wym
otherwise we would have nsfw animu girls waving on the server, or god knows what
i could easily push it and my fans would approve the PR
you'd wake up one day and it's all magical
you have to defeat all the arguments against it, to have it on here
i don't wanna do this in ala's thread
so to stop people from downloading cp on our server, or to stop people from installing qbittorent and torrenting
this is just for future refactoring poc
to make sure it's super secure and contained, and people can't use some exploit via file system access
etc
don't have to worry about that in lambda
it's non-persistent
I know, i was spekaing about /linux command hosted on our docker infra
so it's not that I hate or dislike the ideas
it's just my job to make sure we don't get arrested, and we don't become terrorists by accident
I like ideas, and discussing all this is good
it's a superficial concern because containers don't persist i.e. they are cleaned up after 5 mins and well if you misconfigure docker thats on you
but it's the same with jshell
if we did jshell wrong, it's a prolem
my advice is to do in i issue, present idea well, with all the advantages and disadvantages
so it's all config rather than the implementation itself
and we can decide on it conclusively
not just me an you in some random discord thread
but i'm no longer marketing /linux here
they are no superficial, they are critical
i'm gonna make it a premium bot
sell it 😄
if nobody wants to adopt it while it's free 😦
we can't adopt it, since it's not our project, and it's not open-source
but yeah, just make a good case about it, and it's fine 
i don't wanna anymore 😐
either you take it or you don't 😄 😄
but for now, we can work on jshell
and fix these issues
it's something to pass the time anyway, even if there are other solutions
i just wish it was planned and documented
create an issue on tj-bot, outline everything and we can decide which path to take ^^
from the beginning
the pr-notifications for projects is doing better though
we trialed 3 different ways
2 SDKS, natively calling the API
in regards to your alternate solution
It would be better to draw a diagram
yeah, this project is not done in the same way tj-bot is, where we are super strict, everything is documented, reviewed by multiple pleople, etc
That shows components and flow
i thought it was ready / tested / discussed
there was a reason why I avoided being the only one to bring it online :p
I knew it wouldn't be as easy and smooth as it looks
but also because I don't want to be the only person that is able to maintain it
that's one of the big issues i'm trying to solve, with creating multiple teams
the good thing is that we have 2 new people that can login to the vps and that know the infraa

and having more people involved, 'activated', confident and able to do stuff on theri own
yes, that was the goal 
also this project is basically insvisible, and doesn't have any activity except us here
it requires a lot of work to make these things happen
skill issue all mine have visibility
if any of you give up on it, it's a dead unmaintainable project
yes, it requries skill and effort :p
and time
that's the easier part
harder part is keeping them interested
whent the initial buzz fades
it's because we have no good issues on the project
if TJ bot only had issues noted on discord, then nobody would contribute
yes, one of the 10 problems project has :p
that I outlined from the beginning
also if I remember my advice on that game project idea you guys had
open a bunch of accessible and easy to implement issues, label them properly
do stuff on github
good readme and docs
etc etc
yeah, you need issues that are bite-sized
so someone new can be like 'oh, I could do that'
and make contributing fun and easy
yeah exactly
and that's the domain i'm concerned with mostly
because my job is top level issues
the best quality issue on TJ 😄
what you guys do, how you implemented it, which features and reviews and code..
taht's all well and good
see how beautifully written
user story
context
considerations
whats not in scope
acceptance criteria
sample code
yeah, that's how you do it ^^
and 4 people wanted to pick it up
and we managed to trial 3 ways to implement it
by 3 different people
and on the other side, there is a reason nobody wants to touch jshell
it's not really a junior/intermediate project
(of 5 people that even head about it, and opened the repo)_
if junior/intermediate people can't work on your project at all, you made a bad project :p
and not talking just about the code here
all other parts are more improtant than code itself
we experts can barely work on it 
there's a lot of knowledge needed
spring, docker, jshell, java
the docker part requires really involved knowledge
if you close your eyes, you don't need to look at Spring
yeah,d epends what you are familiar with
but my main point is that only 20% of project is code
you could make it fun and have people test the code well before deployment
for example try to crash or hack it challange, with rewards
or someone to write docs, diagrams, javadocs
or someone to write tests for existing code
or someone to read logs, and create issues based on those
to report bugs
with maybe some directions where to look at
or just users, that will use it around the server, and more people will start using it, and being exposed to it
create small issues, and guide people, create good docs how to set up and write basic feature
so you can have your first contributors that you will help and cheer for
you share knowledge via code reviews, so there are always at least few people familiar with it, can maintain and guide newcomers
and of course making sure it's visible on many different platforms, invite people, do the social/marketing part, make it fun etc
sustainability and maintenance is much more important to me than some specific implementation
especially for a community where people come and go, and open-source software with no paid devs
wait a minute
<<<<<<< feature/SessionsStats
Instant start = Instant.now();
if (!code.endsWith("\n")) code += '\n';
if (!code.endsWith("\n"))
code += '\n';
develop
🤔
pretty sure one of them should be flagged by the linter no ?
what linter, you just have spotless
and maybe spotless:check isn't doing anything special
spotless {
java {
targetExclude("build/**")
endWithNewline()
removeUnusedImports()
// empty string '' covers all imports that aren't explicitly specified,
// we use it as catch-all for external dependencies like JDA
// '\\#` is prefix for static imports
importOrder('','org.togetherjava', 'javax', 'java', '\\#')
// TODO: pinning version because of spotless error https://github.com/diffplug/spotless/issues/1992
eclipse("4.31").configFile("${rootProject.rootDir}/spotless.xml")
}
}
it's not really doing anything
shouldn't it flag one of them as wrong ?
also @sterile crest @bright lark if you have any comment https://github.com/Together-Java/JShellPlaygroundBackend/issues/44
it's using eclipse
eclipse thinks everything is correct lul
i prefer the google aosp format personally
build should fail on both by sonar, because there are no brackets 
these are not python godless lands
but seems like there aren't any automated pipeline checks
it's unclear if spotless is even ran
there should no be formatting merge conflicts tho (if ci/cd pipeline works)
only if you manually introduced them
there is no sonar
the entire repo has nothing setup besides the pre-commit that does gradle build
yeah, so it's not a sonar or spotless issue
it's spotless allowing both varients
since those tools are not even used 
eclipse is ok with it
gradle build does a spotlessCheck
depends how you configure it
yeah i posted the config
yes there is
there are no forced ci/cd checks
you posted gradle script, not the formatting config
oh
nevermind
spotless did fail
lolol
yeah
these things are deterministic, it's easy to know what happened and why
otherwise automating would be useless
but that's accidental spotless run that fails the build
no
there are no guarantees spotless is ran locally
Note that I ran it in local, it didn't fix the code
yeah there isn't
what i'm saying is, there should be seperate actions that deal with each of these things
Also I would need help here https://discord.com/channels/272761734820003841/1268665363881529425
gradle build is correct - but we need Sonar
not sure what correct means
but we tried to make it automatic, so nobody ever has to deal or think about formatting
and that is done mostly with success
sometimes people manage to avoid our automatic spotless run
but we have the tool to stop PRs merging with that pre-commit.yaml that runs gradle build
in regards to spotless allowing both, it's very configurable, you can make it do whatever you want
that name is kinda confusing, because action doesn't happen either pre or post commit
it happens after pushing
but yeah, that's something
what i'm saying, it's much friendlier if all of these tools have individual actions
so people know what failed
with individual logs
and ideally, you know this before you push
ig
pre-merge-check.yaml
what's why there is pre-commit on tj-bot, that automatically runs spotless
and there is a guide to install sonarlint locally and synchronize with our sonarcloud
so you get there issues in realtime
it's kinda annoying to push, then go fix 20 different issues system raised
push again
there are new ones.. 
it's annoying for both users and reviewers
then locally on your machine just do pre-commit install
and it'll install the git hooks
ye, many ways to do it
we automatically install pre-commit hooks, to make it easy to newcomers
i hate that 😄
I kinda disagree with it otherwise, philosophically
forcing something user is not even aware of
i remember when i first used tj bot
i was like where tf did this come from
and then i saw it in gradle...
and was like "ahh"
yeah, it's act of terrorism :p
but we use quite a lot of tech
and we want newcomers to just work without all these issues
a lot of our newcomers don't even know how to solve merge conflicts, or use git
i have a love/hate with the auto rebase too
also why gradle on our projects automatically donwloads jdks, and setups up erverything you need
so you don't even have to install java
(and to install correct version, configure intellij in 3 different places to use correct java version... etc)_
(doesn't work on intellij)
maybe because of my settings which are suited for me
gradle build isn't the first thing I do
a year or two ago when i set it up, intellij didn't fully respect it
because it was a new tech
there was intellij issue trying to address that
not sure where it went
but yeah, we had a lot of problems because of intellij just not respecting our built settings
and doing it's own thing
also some people had intellij configured in a way to ignore pre-commit hooks (possibly a default)
kinda wild, since whole point of a build tool is to have all these things determinsitc
and same on each machine
but whatever
my intellij is setup to directly ignore those types of settings
because i hate behind the scenes stuff
yeah, I just use ./gradlew
i don't
I can't deal with intellij or other tooling injecting some random shit in my commands
i also use git in terminal
i do in some projects have it set to use the wrapper but in others i don't
it's wild what some gui buttons do
i can't git without intellij lmfao
how do i rebase, commit, push, pull, update whaat are these commands!!
oh intellij click on branch > update
nice 
click on branch > rebase
ez
but i'm also a windows user... so gui is life
i remember laughing at this issue
that I actually had to recover my drive by accidentally clicking that button (doing secret and nuclear git clean in background..) on my home
it gobbled all my home as git source directory
bs code!!
and I was like don't do that you stupid piece of shit, looking for X to cancel/discard
there wasn't option like taht
so I clicked discard button
oh my 
it even crashed trying to fuck up 100gb of my drive
that was first time I clicked GUI git button, and the last time
that was wild experience, git clean is extremely nuclear command
and I had no idea
intellij is good though, it has a "recycle bin" and local history
usually gui software never even touches your actual file system
git reset --hard main your branch that has 3 months of changes that you didn't commit? np, we have you covered 😉
X/delete etc work logically
you just remove it from your screen, but not your drive
or yeah, recycle bin, you can undo it.. etc
I always do git pull (note that I have ff-only enabled so pull is safe) or better if I want to be up to date : git fetch --all && git rebase origin/develop 🙂
because it's logical
git reset --soft main lel
there is one git command pinned in #tjbot-discussion that everyone uses 
Whatsp
what does this do ?
a soft reset
gets ur branch upto date with main
deletes ur commits
but keeps the changes on ur machine
i prefer it hard tho 
so u can commit cleanly at the end
yeah ur deffo gay
the past few days have been extra sus
but it's okay, nothing wrong with it
we still love you
i do git very unconventially
it's just what works for me
yeah true
indeed
Im lost
we are the only ones here tho 
it's better here than #tjbot-discussion
Why not a rebase so it commits ?
yeah i do via the ui in intellij
i suck at cli
intellij wraps me in a warm blanket when i do any development 
U can use the git console tab to learn how it uses cli
U benefit from both
(damn why we dnt talk about jshell anymore)
we can talk about jshell if you want
Yes, let's talk about this 🙂
it was on topic with the repo settings
so we need to setup sonar
if you guys don't know how to then it would be a great learning experience to start getting involved
Alr for code quality
I think that a most prior task is to set up a clear documentation in readme
To get started
Alathreon and i had very good onboarding yesterday
sounds good, if you raise a PR then we can review it
Im actually in holidays now
nice
dnt have laptop, But the project is interesting
I want to follow the progress with mobile
Then, we takle bugs
I think they arent many
Once those are fixed we move to enhancements and features
wise words of wisdom firas
firas solved the whole thing, from mobile, on his vacation
basically oriented us for the next 3 years
firas could be our CEO
after we finish all the enchancements and features
we sell it to everyone, and become bilionaires 
Next, we set contributing guidelines
i'm really excited for the movement to cloud firas
Well...
Wdym
i'm interested in becoming at least millionaire
what do you think are the next steps 🍾
Let's say that we indeed aren't doing in bug quntity, but we are doing in term of bug quality...
what the fuck is that emoji
u said you want tj running in azure cloud 
Yea but i thought it's impossible
I french wine
if you think it's possible, lead the way
I ve contacted some engineers i know they collab alot of azure techs
brokie, azure is gonna 10x our costs
that's the real win
do you know any extremely rich people wiling to fund us?
They told me it's not possible to support nonprofit opensource in cloud hosting
sorry ala
Im looking
95% of messages in this channel are offtopic
I want to stay in topic
me too
Alright, lets have a good roadmap for jshel
yep, what tool should we roadmap with?
Roadmap is while(hasBugs) fixBug;
but if we're road mapping then we need to set timelines
Alr but we need to provide welcoming atmosphere to others
otherwise we won't know how much time we spent on the issue, nor how much to bill the client..
Thats with readme, and contributing guide
we need time tracking software
timeline is
long start = System.nanoTime();
while(hasBugs) fixBug;
println(System.nanoTime() - start);
any recommendations for linux?
can you make a confluence doc or something?
it'll get lost in the chat
only 6 issues?
and it's not like it is complicated
I agree with this lol
we fix bugs
I just saw the recent issue on gh, good
i an fix all 6 issues before i go to bed
we just have to clean up and improve the project
do #5
it may takes a few days
and question if we should add functional tests
yes
Also, set up some tests to avoid regressions
??
right, can't forget about regressions
i can do this in 15 mins
this is nothing
what sonar warnings bro
we don;'t have sonar
Ah well, all those points are already done
I meant to fix the current approach with calling docker
make an issue for it
right
with lots of detail please
firas will make the charts
https://github.com/Together-Java/TJ-Bot/issues/1142 example of good issue
what tool for chating we should use?
i think slack?
Not a newspaper pls
art of creating pleasing charts
do we need a jshell logo@?
Wdym
tjbot and tjplay has one
we need diagrams
Discord?
yeah, charting, not chatting or sharting
i heard lucid charts is good but i've never used it
It's limited
i read a study about mind maps, users have better long term recollection
do we need UML before we refactor the code?
Drawio is life
plantirUML maybe?
1st step: we define an overview about jshell.
2. We analyze potential actors
3. We analyze use cases
Im typically skilled in writing good doxs for uc
Wdym
what should we do about our potential cloud competitors?
Please stop trolling
we're not joking, we just want to take it serious
If im saying somthing unfeasible tell me
i think marko meant more like research on the technologies
so far its all good
wym by "We analyze potential actors" ?
this thing?
ahh, reminds me of uni days 
@compact holly can I put this exact log in a github issue?
Ye based on information i have sf they are: user (abstract) and discord api
Or user, tjbot and discord
where does jshell come in?
looks fine
Jshel is the system
Actors are those who could interact with the system
that too, but im more interested about our customers
who do we sell this amazing product to?
i already did the research for /linux
lel
It's not a product
would be nice to earn some monies, and retire 
alright
guyes
so all these diagrams.. for nothing? 
It's an opensource solution
how is anybody gonna pick this up
it needs refinement
We didnt set any diagrams yet
We could draw 2 or 3 diagrams
For key features or main ones
I like diagrams
but what I like even more are sexy dashboards 
imagine just watching all the infra live, sitting in your room naked at 4am
they help to see it in the big picture. also to help others
just chiling, listening to some jazz
Damn
and watching all the containers move, like you are a drug smuggler
Why u do this
from dominican republic to congo to our vps 
it should be this easy @timber mirage
drinking some quality whiskey
entire solution is 87 lines
There is also this issue
very specific
you could've just said simplify whole backend, and save yourself some time 
you can reference my code entirely to make it work
A big part of it is fine, problem is the docker service and closing behavior
also @compact holly can you make functionnal tests ?
maybe update the dependency as a first step? https://github.com/Together-Java/JShellPlaygroundBackend/pull/37
any parts of it you specifically dislike, reasons why you dislike them?
if we rework stuff in the backend, we do need those tests
strategies we can deploy to improve it?
what are you talking about ?
what particular issues does it have, why is it complex?
When we will have functionnal tests
the dockerservice class for example
what are you talking about ?
docker service or closing ?
do you have any ideas what could be done, strategies, refactoring methods?
Well yes it's a big and complex class, it can be improved
maybe some examples?
from what @sterile crest said
Ask wazei for docker, that's mostly his opinion
in short, someone new coming to project, how should they approach it?
just make it better 
yeah
that thing there? yeah
Alr so first : reduce complexity. Then set getting started guide (damn why we dnt this like the one in tjbot wiki)
i can work on the docker side
Im afraid they are priority as they help all of us
To see it
U understand what i mean
yes, we can't stumble around blindfolded
we need some guiding light
that light would be you, firas 
you are the chosen one
so feel free to write some docs 
i really feel like firas is going turn this project around, i can't wait 
The problm is dnt have laptop in the coming 4 days
Im normal person
nobody is normal!
I love Software dev thts all
If im tht, then u are more
oh you cannot compare mere mortals with gods, that wouldn't be fair
Ah shit here we go again
we're leagues ahead of the rest but you're our messenger and the saving grace for the mere mortals that attempt to touch this jshell project
with your guidance and words, people will be able to understand the complexity a bit better
that's why the docs and diagrams are important
to preach the words of the elite to the uninformed
The hard part is understanding the problem
we can even refer to the space as the "jshell bible"
because it contains all the teachings and information from the creators
you're an important piece to the puzzle
i feel this is a joke
"Let them alone; they are blind guides of the blind. And if a blind man guides a blind man, both will fall into a pit.”
matthew 15:14
it's not a joke
we do need all of this stuff in place
Cmon pls
Alright then
Agreed
I m gonna make some search on the ez ways to set good docs
can i recommend https://docusaurus.io/?
and meaningful diagrams
there is one doc tool written in rust!
no please
the one i recommended at least has the word "java" in the name
This tools is magic
We can have a whole static website for docs
yeah and host it using github pages
We could set introduction and guidelines in tab 1. Tab 2 can hold openapi docs for the jshel rest api with searchbar and table for fields
we used mdbook for our java book 
and look at the java book
biggest tj fail yet
I know it, it's limited
years ago
when we were still starting to build our empire
@bright lark what do you think ?
I created this issue 
Use colors pls
i made quick comparison about different tools for creating docs
@compact holly i can't man
Like ?
i'm dying
your docusaurus is not even on my list
Give each component or layer a color to make it obvious
probably some new bs
use plantuml ala
so besides this
I also wrote automatic UML generation on TJ
nah
Trust me it's damn cool
using plantUML doclet
What is that?
Yes but it will be ugly
generating UML disagrams from java code
Waait guys
i did this by hand
Please wait
automatically, and embedding them in javadocs html files
There is a very useful tool i know
the only issue at that time was, that we didn't have any javadocs
so my uml implementation was a bit early
or well, our javadocs weren't published online
so having UML diagrams weren't that useful
@bright lark like this?
dw jshell has no docs either
hooly, here we go 
?
i deleted it was work stuff :3 sorry marko
tj-bot has javadoc on each method 
diagrams, that's what we needed all along 
Looks better
Now the arrow on the left
bro used that bucket fill tool in paint 
you need to use a proper sequence diagram not this mspaint shit man
I also can only read crow's foot anotation
We need to put the jshell system boundaries
And put actors (those who interact with it outside
The arrows must come from somthing to the system and from system to somthing
An entity–relationship model (or ER model) describes interrelated things of interest in a specific domain of knowledge. A basic ER model is composed of entity types (which classify the things of interest) and specifies relationships that can exist between entities (instances of those entity types).
In software engineering, an ER model is commonl...
It doesnt make to come from void
Crow's foot notation, the beginning of which dates back to an article by Gordon Everest (1976),[16] is used in Barker's notation, Structured Systems Analysis and Design Method (SSADM), and information technology engineering. Crow's foot diagrams represent entities as boxes, and relationships as lines between the boxes. Different shapes at the ends of these lines represent the relative cardinality of the relationship.
That could be done when we set potential usecases and actors
chen is considered for losers
that are uneducated and illiterate, so they can't read superior crow's foot notation
@bright lark alright
so like firstbox is discord > tj > jshell > internals