#JShell project for Tj-Bot!
1 messages ยท Page 8 of 1
i do
but sometimes i lose motivation
this server helps to move forward and be updated
Just means you're not passionate enough on the topic
in fact, in my local community (people i get in touch with, everyday) im considered one of the biggest java passionates
but maybe compared to you here, i may get lost
or my level is nothing to some people
i talk about developers
Ah okay
I'm not as passionate now, knowing the stuff I know
When you start working on more bigger, complex problems, Java does start to feel like a nuisance
it depends
well it seems we're getting out of scope of the channel
let's talk somewhere else
shall we?
Nah DW this channel is only 10% jshell and 90% chitchat 
lmao sadly
But sure you can move
lacking
in my college, everyone fucking sucks
cant even make a serverless backend like cm'on get better
yea, they lack lord wazei
That you
But isn't friday midnight between friday or saturday ?
boi time is common sense
when it's 0:00 and the day is friday it runs
when it's thursday 23:59
in 1 minute it will be 0:00 Friday
and the action will run
the value is literally hard coded cron: "0 0 * * 5" # Every Friday at Midnight
when the time is 0:00 (midnight) it's the start of the day
ah alright
@timber mirage remember, I added workflow_dispatch:
this means you can also trigger it manually via the actions tab
give it ago!
Well obviously
Yeah, I've been able to implement it, but decided to work on another issue together with this one, which is the refactor for docker service, but I've been caught up in work lately so I'll try making the PR during the week or next weekend.
So tell me when you will have advanced for the other tests
Improve DockerService class ?
huh
without GH issue ?
i can create one if you want
ye
thanks
i gotta sleep now sorry, we'll talk more
later
@stiff oak @bright lark any advancement ?
hello ala
i didn't find time
also is there an issue on gh?
There wasn't, now there is https://github.com/Together-Java/JShellPlaygroundBackend/issues/65 ๐
alr thanks
ill take a look
wdym ?
I mean, everything is left to do
Sorry, didn't find time this week either, I'll try in the next
Does this mean I don't need to add tests to my PR?
Firas task is to ad tests yes
And those are exclusively calling endpoints, so you don't need to add any test because once Firas will add them, what you are doing shouldn't break any of them
it's open to anybody to add test if they want ?
If they think a specific test should be added they can submit an issue
But we should first make a solid foundation of tests
no
there are only 2 tests
That's far from enough
Hmm
So we have a bug
Nothing surprising there 
Problem is that it doesn't quite match with what simon got #1296444187943632956 message
so I have no idea what is happening
@timber mirage Please I have a question.
How do you check if a container is ok, from the code it seems that it's only after executing a piece of code and the last line is OK, however, if I had started a container previously with the startup script, and a request is made with the startup script id, and I find a container with the startup id already in the pool, I want to immediately return the container so I attach a reader and writer to the container, and using the util method checkContainerOk, the reader.readline() blocks the main thread because no initial startup script was ran or maybe I'm mistaken about smth
This is why we need a fallback option 
huh
It's not critical
You can just check if the container is alive
And I am not sure to understand the problem
If someone sent a request and you want to return the container, then just execute the request on the container
Well jshell failed for Simon 
JShell indeed failed him, rip.
Should I buy some flowers ?
Yes he deserves compensation
๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป๐ป
@cedar fog alright here are your flowers

Request failed: Conflict. Session may have been forcibly destroyed.
@timber mirage it seems more are needed.
You heard him @timber mirage give him more flowers!!! ๐๐น๐๐น๐๐น๐
Snippets
Snippet 23, VALID
int a = 2 + 2;```
jshell> `4`
## System out
[Nothing]
Snippets
Snippet 23, VALID
int a = 2 + 2;```
jshell> `4`
## System out
[Nothing]
Snippets
Snippet 24, VALID
String result = "4" + "2";```
jshell> `"42"`
## System out
[Nothing]
Snippets
Snippet 25, VALID
Integer age = ThreadLocalRandom.current().nextInt();```
jshell> `-1313721332`
### Snippet 24, VALID
```java
var result = switch (age) {
case Integer i when i < 5 -> {
yield "Below 5";
}
case Integer j when j > 5 && j < 10 -> {
yield "Between 5 and 10";
}
default -> "Higher than 10";
};```
jshell> `"Below 5"`
### Snippet 26, VALID
```java
System.out.println(result);```
## System out
Below 5
flower in the hole
@timber mirage I've created a Pr for the issue https://github.com/Together-Java/JShellPlaygroundBackend/issues/60
So I reviewed your PR
I might have asked for too many logs to be added, but we will see that if the logs take too much place in the log file.
@timber mirage what happened here 
Looks like the curl request failed ๐
Huh
What di dyou do ? ๐
Wdym "maybe", that's your code -_-
Hello @timber mirage
I understand that we would want the pool container to have a startup script with it, but which should it be? Cause I can only see two startup scripts available
Yes, it would be the second one
Alright
Hello
I see the problem
its because you fucked with the cURL request
?
curl -s "https://hub.docker.com/v2/repositories/library/eclipse-temurin/tags/?page_size=100" | jq -r '[.results[].name | select(test("alpine")) | select(test("^[0-9]+"))] | map(capture("^(?<major>[0-9]+)")) | max_by(.major | tonumber) | .major'
it sok
i can fix
i think
it's printing out 8
idk why ๐
hehe docker broke it not u ๐
sory soprry
What's the difference ? (right is yours)
Ah ?
Hello @timber mirage
Please I wanted to ask about the comment on the startupScriptId that should not be null. The startup script id is annotated nullable in JShellSessionService and it defaults to empty if it's null, do I set a default value from there, or is there something else you had in mind
This should never return null https://github.com/Together-Java/JShellPlaygroundBackend/blob/4fb543605f5a0d2743926cec9ee5898e13729429/JShellAPI/src/main/java/org/togetherjava/jshellapi/service/JShellSessionService.java#L95
API to execute custom JShell code. Contribute to Together-Java/JShellPlaygroundBackend development by creating an account on GitHub.
Yeah, it doesn't so if the id is null, the get always retrieves the StartupScript.EMPTY value.
yes, never handle the scrit id yourself, only ever use the startupscript service
Yeah, the value of the script can be null because I'm getting it directly from the JShellSessionService , however, the value will always default to the EMPTY type. Therefore I can leave the startupScriptId as nullable right? Except you would want me to explicitly assign it to empty if it's null, which is kind of redundant since the startupService defaults it to EMPTY.
No, you are supposed to use startupscript service
Hmm, I don't really get. Yeah, I am use the service to retrieve the actual startup script, except you mean something else.
Ah, I see the problem, ignore that then, but don't forget to put the nullable annotation
Alright
@timber mirage I've updated the PR.
// Basic Java classes
import java.lang.*;
import java.lang.annotation.*;
import java.lang.invoke.*;
import java.lang.module.*;
import java.lang.ref.*;
import java.lang.reflect.*;
import java.lang.runtime.*;
import java.math.*;
import java.net.*;
import java.nio.*;
import java.nio.channels.*;
import java.nio.charset.*;
import java.nio.file.*;
import java.nio.file.attribute.*;
import java.nio.file.spi.*;
import java.security.*;
import java.security.cert.*;
import java.security.interfaces.*;
import java.security.spec.*;
import java.text.*;
import java.time.*;
import java.time.chrono.*;
import java.time.format.*;
import java.time.temporal.*;
import java.time.zone.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import java.util.function.*;
import java.util.jar.*;
import java.util.logging.*;
import java.util.prefs.*;
import java.util.random.*;
import java.util.regex.*;
import java.util.spi.*;
import java.util.stream.*;
import java.util.zip.*;
// Input/Output
import java.io.*;
import java.nio.file.*;
// Networking
import java.net.*;
import java.net.http.*;
// XML (if needed)
import javax.xml.*;
import javax.xml.parsers.*;
import javax.xml.stream.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.sax.*;
import javax.xml.transform.stax.*;
import javax.xml.transform.stream.*;
import javax.xml.validation.*;
import javax.xml.xpath.*;
// JSON (Java EE)
import javax.json.*;
import javax.json.stream.*;
import javax.json.bind.*;
import javax.crypto.*;
import javax.crypto.interfaces.*;
import javax.crypto.spec.*;
This is from chatgpt, if we don't already, let's add some of this to jshell
It already have this
How do you think you can use List without needing to import it
I mean making the list bigger
I think we also discussed adding some common libraries too like Jackson
Is it in java by default ? If not, no, because the image and container would be bigger
is that a problem?
yes
well, we could make so the user can ask to create a session with such thing
it could be an interesting improvament, so we can allow any lib, but only when the user asks for it
or yeah, we make a add-lib option which the user provides the coords
It would complicate
The usecases
how?
I mean from discord
As adding a lib dynamically requires some verifications
And separation of concerns
This idea can be great within a website
Preparing a dev container and a file explorer ui view
No news from us, and what about you, have you advanced for the tests?
not yet
i got a long period of hardwork
weekend was my only way to release myself

7k messages on one thread is insane
true
i need to come back to this project soon :/
sorry guys, i ve been too busy with bunch of work
hello Ala !
im back to the server 
and to this one as well
I remember i worked on integration tests
probably going to move forward with this
We didn't advance since then, too busy doing other stuff
I see, ive been busy too
.