#dev-general

1 messages ยท Page 402 of 1

cinder flare
#

like I could write a java program to represent a bank or something

#

hmm

#

that's a little rough to do interoperability lol

prisma wave
#

yeah exactly lol

#

there's not really much you can share there

#

i'd just be doing 99% of the work in haskell and just calling 1 function from java (or vice versa) which seems boring

#

and i also dont want anything too complicated because just figuring out JNI is gonna be hard enough

cinder flare
#

object oriented haskell maybe?

sweet cipher
#

You want to make something with both java and haskell?

prisma wave
#

blursed

prisma wave
#

using C functions for the "glue"

cinder flare
#

maybe like a bank or something that calculates numbers using haskell but inside of a java class model?

sweet cipher
#

Maybe a calculator that stores previous equations or something?

prisma wave
#

hmm

sweet cipher
prisma wave
#

that's not bad actually

#

do the IO in java and the operations in haskell

cinder flare
#

ah yeah that'd be good

#

haskell is a number cruncher after all

prisma wave
#

precisely

#

ok let's try this out

#

ok off to a good start, haskell is generating c headers correctly

#

this is cool

#

So I have the FFI header stored at ./.ghcup/ghc/9.0.1/lib/ghc-9.0.1/include/HsFFI.h right now, what's the best way of including that?

#

doing the absolute path sounds bad

cinder flare
#

can you do relative path?

prisma wave
#

i could but that sounds even worse

cinder flare
#

does it change?

prisma wave
#

it might

cinder flare
#

oh jeez

prisma wave
#

if a different ghc version was installed or you move the project folder

#

not sure how you're normally supposed to handle this sort of thing

cinder flare
#

does it not recognize it in the project directory like normal C?

prisma wave
#

it's not in the project directory

cinder flare
#

oh

#

yeah okay that's real weird

prisma wave
#

should i just copy HsFFI.h into the project directory?

#

i dont think the definitions will change

cinder flare
#

yeah that sounds pretty good

#

then it just recognizes it

prisma wave
#

sounds like the easiest option

#

just to make sure

#

@obtuse gale help pls ๐Ÿ™‚

cinder flare
#

lol everyone needs Fefo

oak raft
#

second time fefo was requested for help lol

cinder flare
prisma wave
#

๐Ÿฅฒ

obtuse gale
#

what

#

omg

prisma wave
#

is this a good practice

#

let me summarise quickly

#

haskell <> C interop uses 2 headers:
blah.h which is generated from the code i've written, i can just include that with a relative path
HsFFI.h which is somewhere on the user's system depending on where they've got stuff installed

including HsFFI with an absolute or relative path sounds bad, so should i just copy it into the project folder?

oak raft
#

yeah it's a good practice

prisma wave
#

since when do you know c

oak raft
#

I don't

prisma wave
#

ah

#

๐Ÿฅฒ

oak raft
#

yet fingerguns

obtuse gale
prisma wave
#

on my system it's ~/.ghcup/ghc/9.0.1/lib/ghc-9.0.1/include/HsFFI.h, but that won't be the same on every system

stuck harbor
#

can u specify in a config file?

#

or ask for a symbolic link to a directory ya already know

prisma wave
stuck harbor
#

idk I haven't read up

#

cba

prisma wave
#

it's a c header lol

obtuse gale
#

there should be some way for you to specify that include dir as a path for the compiler to look in

prisma wave
#

ah that might be the best way then

#

i think i saw gcc has an option for that

lunar cypress
#

yes it does

stuck harbor
#

we all love g++

lunar cypress
#

that's when you use the angle bracket include style

prisma wave
#

the only issue is that it probably won't get rid of this ๐Ÿฅฒ

stuck harbor
#

yeah thats a problem which is annoy

#

use sublime text

#

u fuckin' nerd

cinder flare
#

wtf

#

why would you do that

#

when CLion exists

prisma wave
stuck harbor
#

I'm a sublime text stan

#

now

cinder flare
prisma wave
#

ok so the gcc route is the best option right?

prisma wave
cinder flare
#

yeah one per lang?

stuck harbor
#

friendship ended with emacs, now sublime text is my friend

cinder flare
#

not too bad, you already got java

cinder flare
lunar cypress
prisma wave
#

IJ takes long enough to startup

#

cba to install 2(+) more plugins

stuck harbor
#

too long in fact

prisma wave
#

vsc is fine

#

anyway that's not important

cinder flare
#

nah IJ loads plenty fast for me bro

#

get an SSD

stuck harbor
#

read-edit program loop yeet

lunar cypress
#

bro just upgrade your pc 4head

stuck harbor
#

6head

cinder flare
#

16head

stuck harbor
#

32head

cinder flare
#

2^69head

lunar cypress
#

you already messed up iwan

prisma wave
#

oh man

#

do i have to pass the JNI header path to gcc too

stuck harbor
#

whaaaa

prisma wave
#

ill take that as a yes

stuck harbor
#

bm what are you... doing?

#

im getting cold feet from all these dependencies

cinder flare
#

frankensteining C, Java, and Haskell together

prisma wave
#

yes

#

precisely

stuck harbor
#

ffs

#

what are u gonna call it

#

jcaskell?

prisma wave
#

jascell

stuck harbor
#

no

#

jcaskell

prisma wave
#

lmao

obtuse gale
prisma wave
#

๐Ÿ˜Ÿ

#

c ecosystem is scary

#

should i be using gcc or g++

stuck harbor
#

can we throw some common lisp into the concoction of satan

cinder flare
stuck harbor
cinder flare
prisma wave
cinder flare
#

G++ is for C++

stuck harbor
#

idk prolly

cinder flare
#

gcc is for C

lunar cypress
prisma wave
#

oh lol

stuck harbor
#

same 'ting

cinder flare
#

they're really quite not lol

stuck harbor
#

just use chez scheme u nerds

#

i'll eat u

cinder flare
#

oh it's Scheme but different

#

huh

stuck harbor
lunar cypress
cinder flare
#

gcc can do either C or C++

stuck harbor
cinder flare
#

but also you just should use LLVM instead it's better lol

cinder flare
stuck harbor
#

achoo good

#

wait...

#

could that

#

go to enscripten?

prisma wave
#

๐Ÿ˜ฑ

stuck harbor
#

a competitor to clojurescript pls

obtuse gale
prisma wave
#

what does that mean

obtuse gale
#

that's what she said ๐Ÿฅฒ

prisma wave
#

๐Ÿ˜ฉ

cinder flare
#

well I presume it uses GCC

stuck harbor
#

it is not specified bm

cinder flare
#

and you need LLVM for emscriptem

stuck harbor
#

oop

#

welp

#

sadge

prisma wave
#

USELESS

#

i have to do EVERYTHING myself

cinder flare
lunar cypress
prisma wave
#

thank you

#

right

#

java -Djava.library.path=../JNI Library well this is the command i am running

#

project looks like this

cinder flare
#

oh yikes, does it support makefile?

prisma wave
#

what's "it"

cinder flare
#

manually making that command is gonna suck

#

whatever you're doing

#

can you use not the command line

lunar cypress
prisma wave
#

i think i am

#
    static { 
        System.loadLibrary("native");
    }
stuck harbor
#

long shot, but does anyone know any opengl bindings for scheme?

errant geyser
#

BM how tf have you done this Haskell/Java interop thingy and why

cinder flare
lunar cypress
#

is it literally called "native"

stuck harbor
#

no reason why i'm asking star

cinder flare
#

why would you ever want to do graphics programming in a lisp derivative

prisma wave
stuck harbor
#

no reason at all

lunar cypress
#

bruh

prisma wave
#

i mean

#

the tutorial said it's "native"

#

but im not sure if that string is special at all

lunar cypress
#

it is not

#

it needs to be the name of your shared lib

#

so libnative.so from the looks of it

prisma wave
#

hmm

#

that's odd

#

if it's libnative then shouldn't the string be that?

stuck harbor
#

man i should port monogame to scheme

#

that would be awesome ngl

prisma wave
#

cursed

lunar cypress
#

I can remember there being some hacky code to figure out the right file ending

#

but it might work without the extension

#

cant remember

#

prolly does

stuck harbor
#

anyhoo

prisma wave
#

The {@code libname} argument must not contain any platform
* specific prefix, file extension or path.

#

sounds about right

#

lib is a linux prefix right

lunar cypress
#

ugh

#

idk

cinder flare
#

you still need a Rust backend for it

stuck harbor
#

comme ci comme ca

lunar cypress
#

"normal lisp"

prisma wave
#

yeah i think it is

stuck harbor
#

yes johnny

#

normal

#

this channel is lisp territory

prisma wave
#

changing to "libnative" caused a different error

lunar cypress
#

ok well if it loads then the function isn't exported correctly

#

or theres something wrong in the definition

prisma wave
#

hmm

lunar cypress
prisma wave
#
#include <HsFFI.h>
#include <jni.h>
#include "../Haskell/Calc_stub.h"

JNIEXPORT jint JNICALL Java_Library_addHs(JNIEnv* env, jclass clazz, jint a, jint b) {
      return add(a, b);
  }

does anything look wrong with this

stuck harbor
#

i would call common lisp "normal" lisp

lunar cypress
#

Is GameLisp common lisp

#

no

cinder flare
#

or even a Scheme derivative

prisma wave
#

the lambda calculus is normal lisp

lunar cypress
stuck harbor
#

don't say those words bm

#

no lambda calculus here

#

oh its saturday now

prisma wave
lunar cypress
#

which class

onyx loom
#

00:00 ๐Ÿ™‚

prisma wave
#

Library.java

#

no package

stuck harbor
#

00:00 fun

#

right time to slep

#

i guess ill have to settle for f#

prisma wave
#

cute

stuck harbor
#

ffs

#

i would rather use many parenthesis

#

i guess ill use none

prisma wave
#

for reference the definition was pretty much copy pasted from the generated header file

#

so i dont think that's the issue

#
#include <jni.h>
/* Header for class Library */

#ifndef _Included_Library
#define _Included_Library
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     Library
 * Method:    addHs
 * Signature: (II)I
 */
JNIEXPORT jint JNICALL Java_Library_addHs
  (JNIEnv *, jclass, jint, jint);

#ifdef __cplusplus
}
#endif
#endif
stuck harbor
#

imagine using jni

#

why would u use jni

prisma wave
#

imagine contributing

stuck harbor
#

lol if i knew C then sure

prisma wave
#

๐Ÿฅฒ

#

i dont know C and im still contributing

stuck harbor
#

i made a ds game in ancient c++ once

prisma wave
#

impressive

stuck harbor
#

not really

#

libnds is super simple

#

installing devkitpro was harder haha

#

and figuring out buildscripts

#

C should look at lein

#

super simple

lunar cypress
#

I would probably inspect the binary then

prisma wave
#

libnative?

lunar cypress
#

yes

prisma wave
#

oh lord

lunar cypress
#

how did you compile that btw

pale shell
#

C?

#

Isn't c an annoying language?

prisma wave
stuck harbor
#

if you don't have to use C, don't

cinder flare
#

C is kinda fun ngl

stuck harbor
#

thats the rule bm

prisma wave
pale shell
#

I wish I could code in c

lunar cypress
#

no that's not the rule

prisma wave
#

pretty much copy pasted

stuck harbor
#

that is the rule

lunar cypress
#

the rule is don't ever use c++

pale shell
#

I heard c is fast, right?

cinder flare
#

im taking an entire semester-long C class next semester haha

prisma wave
pale shell
stuck harbor
pale shell
#

What is rust like?

prisma wave
#

pragmatic

#

wait no stop circlejerking

stuck harbor
#

even torvalds agrees that rust may be super cool

cinder flare
prisma wave
#

i have an actual issue here

stuck harbor
#

and torvalds is a C stan

pale shell
#

I wanna learn a new language but idk ahsf language

cinder flare
#

we're still seeing what Rust can do

prisma wave
#

haskell

stuck harbor
pale shell
cinder flare
#

though I would be interested in seeing an OS in Rust

pale shell
#

Give others a chance ๐Ÿ˜‚

stuck harbor
#

mmmhm

cinder flare
#

until then, I don't think it can contest C

stuck harbor
#

odin u should use chez scheme

pale shell
#

I might learn haskell

cinder flare
#

just learn Haskell

pale shell
#

Idk

stuck harbor
#

i think you would like the syntax of scheme

lunar cypress
pale shell
#

Scheme?

cinder flare
#

and if you're gonna learn a lisp, just use normal Scheme not whatever iwanio's peddling

stuck harbor
#

oi

prisma wave
#

clojure

stuck harbor
#

sadge

cinder flare
stuck harbor
#

chez scheme is normal scheme

pale shell
#

The thing is, I'm scared to learn haskell because bm will move onto a new language next week

prisma wave
#

no

#

haskell is forever

stuck harbor
#

u google scheme, u get chez scheme star

cinder flare
#

no bm's been pretty strong on haskell

pale shell
cinder flare
prisma wave
#

yeah i dont plan on abandoning haskell for a while

stuck harbor
#

shhhh

pale shell
cinder flare
stuck harbor
#

shh

#

sh

lunar cypress
pale shell
stuck harbor
#

imagine using mit scheme

#

this post was made by abcl gang

lunar cypress
#

imagine using scheme and then abandoning emacs smh

stuck harbor
#

it was a joke johnny

cinder flare
# lunar cypress just look it up

oh damn okay! well I still don't know enough about it to have much of an opinion, but if non-trivial stuff starts being made with it I'm all down for it

stuck harbor
#

im not abandoning emacs for sublime text

cinder flare
#

that's a hell of an upgrade

pale shell
#

I had my bank statement come in today, it had ยฃ600 in payments for pokemon cards. I'm not addicted promise reversed_fingerguns

stuck harbor
#

||yet||

pale shell
#

I wanna finish my set

stuck harbor
#

thats like... a day's rent in london!

cinder flare
#

600 pounds wow

#

that's as much as your mama weighs

#

ayyyyyyy

stuck harbor
#

...

lunar cypress
#

what I definitely like most about (doom) emacs so far are the comments in the init.el file

stuck harbor
#

yes

#

true dat

pale shell
#

I'm legit so addicted to pokemon cards

onyx loom
pale shell
#

The only reason I wanna get a 4th job is to get more cards

cinder flare
onyx loom
#

no

lunar cypress
#
$ cat .doom.d/init.el | grep haskell
;;(haskell +dante)  ; a language that's lazier than I am```
pale shell
cinder flare
#

60-69

onyx loom
#

referencing pounds
mama
its not uncommon to see americans be 600 pounds fingerguns

stuck harbor
#

correct

cinder flare
stuck harbor
#

americans be fat tho innit

cinder flare
#

but yeah the second and third are kinda tru...

stuck harbor
#

emacs lisp good

#

vim script bad

ocean quartz
stuck harbor
#

don't @ me

pale shell
#

Good morning bm

stuck harbor
lunar cypress
onyx loom
#

i promise we dont

stuck harbor
#

stones are very good units of weight/mass

#

i forget which

pale shell
#

Bm come back to java and kotlin

cinder flare
#

not java

prisma wave
cinder flare
#

just kotlin

ocean quartz
#

I weight 2 boulders and a half

stuck harbor
#

omfg

pale shell
#

Java is good

onyx loom
#

what the hell is this new reaction display

cinder flare
prisma wave
onyx loom
#

the old one was SO much BETTER

stuck harbor
#

anyway its not "stones" its "stone"

prisma wave
#

oh wait you said bad

#

nvm

#

everyone would agree then

prisma wave
stuck harbor
#

you could weigh 9 stone, not 9 stones

pale shell
prisma wave
#

boring

cinder flare
#

kotlin kinda cute

ocean quartz
stuck harbor
#

omfg

pale shell
#

It's not boring bm

prisma wave
#

ok i guess jni can wait until the morning

stuck harbor
#

okay ill use kilograms then, u happy?

onyx loom
#

good

cinder flare
pale shell
#

You forced us to use kotlin bm

ocean quartz
#

Lmao bullied into change

cinder flare
#

i'll kill your gram mate

onyx loom
#

no one forced u odin fingerguns

pale shell
#

You went around forcing us to use it now you leave us behind

onyx loom
#

its just a way of life reversed_fingerguns

stuck harbor
#

i do want to switch to SI units

#

ill drive in metres per second

pale shell
#

I might uninstall kotlin to show how disappointed I am

stuck harbor
#

k

cinder flare
#

meters per second wtf

stuck harbor
#

install clojure

prisma wave
#

Kotlin is fine

#

Just boring

pale shell
#

No it's hot

stuck harbor
pale shell
#

It's better than what you're doing now

stuck harbor
#

and is used in science all the time

cinder flare
stuck harbor
#

cars suck

#

cars 2 sucks harder

#

cars 3 is balls

lunar cypress
#

Does anyone remember whether you can integrate a custom editor with clash of code

cinder flare
#

nah mate cars 1 was great

stuck harbor
#

cars 4 is a conspiracy

prisma wave
pale shell
#

Ghc???

#

New language?

onyx loom
#

glasgow haskell compiler lol

stuck harbor
#

hehe

pale shell
#

Glasgow ew

stuck harbor
#

glasguuu

#

glasgeeee

onyx loom
#

just because someone is using another language that ur not using, doesnt mean u should follow them tho lol

cinder flare
#

glazz gew

stuck harbor
#

yes star

#

glazz gew

lunar cypress
#

ok i did not know that was a thing

stuck harbor
#

that is how it is pronounced

prisma wave
#

vim mode lmao

cinder flare
#

oh what the fuck

stuck harbor
#

minimap?

cinder flare
#

emacs mode are you kidding me

stuck harbor
#

what the shit is that

#

o shit

#

yes

#

M-x C-c c

onyx loom
#

minimap, clash of code be playing COD out here wtf

prisma wave
cinder flare
#

yeah the code preview on the right

stuck harbor
#

ah

prisma wave
#

There's also a "pro mode" where you can test the code with your own inputs

#

I'm not sure how useful that is

#

But

#

ยฏ\_(ใƒ„)_/ยฏ

stuck harbor
onyx loom
#

ez cheats

stuck harbor
#

very real

cinder flare
#

would've saved me a few times of it not telling me what input it was giving me

onyx loom
#

i thought it did?

cinder flare
#

naw one of them was adding up numbers or something and I kept thinking I did it wrong because it showed a bunch of random numbers twice

onyx loom
#

pretty sure u can click on the tests and see what its giving u or smth, iirc

cinder flare
#

but it was from forgetting to convert char->string->int

#

stupid char->int ascii

lunar cypress
#

aw man that local editor thing is just a chrome plugin

#

no proper api

cinder flare
#

just copy paste into IJ

lunar cypress
#

No I wanted something to hack with emacs

#

Thought that might be fun

cinder flare
#

oh it has an emacs mode right?

#

and surely IJ has an emacs plugin?

#

IJ has a vim plugin and it's pretty good

lunar cypress
#

no like I mean I wanted to try and write a plugin that allows you to edit coc code in your local emacs

prisma wave
#

Once me and yugi remake CoC an Emacs plugin will be our #1 priority

onyx loom
#

yes remake coc without all the shitty challenges

lunar cypress
#

wow i feel so much safer now

prisma wave
#

Too bad it's probably closed source

cinder flare
#

hold on

the file
/ (the root directory)
and the history of sync files?

#

that's a lot

lunar cypress
prisma wave
#

๐Ÿ˜ฎ

stuck harbor
#

well i don't use chrome

#

so heh

cinder flare
#

damn you really are a linux user huh

lunar cypress
#

(btw)

cinder flare
#

i mean I like Arch but I still use Chrome

#

and vim

prisma wave
#

real x10ers create their own lightweight web browser based on electron

stuck harbor
#

hehe

lunar cypress
#

lightweight
electron

stuck harbor
#

I did use librewolf for a while

#

but it was a bit too private

onyx loom
prisma wave
stuck harbor
#

it wiped all data on session end

#

all

prisma wave
lunar cypress
#

oh god now I have to think of that one pcj post with the premium clock widget

prisma wave
#

is that the one where you pay $10 for a clock?

lunar cypress
#

yeah

prisma wave
#

a month

#

๐Ÿฅถ

lunar cypress
#

and it's electron based and consumes a fuck ton of memory

prisma wave
#

lmfao

#

Electron based clock

obtuse gale
#

hilarious

#

Funniest shit I've ever seen

lunar cypress
#

I don't know where to find it anymore but that dev's comments were hilarious

prisma wave
#

i also like the chrome streaming SaaS for low-end PCs where the client is written in electron

#

can't make it up

obtuse gale
#

Then he turned himself into a pickle

onyx loom
#

saas?

prisma wave
#

Software as a service

#

I.e monthly subscription

prisma wave
#

People complain that our widget takes more space in memory than the entirety of Encyclopaedia Britannica would take, but frankly, if you look at it rationally, Encyclopaedia Britannica is not capable of showing you Today's weather, and neither is it able to show you personalized offers from our partners.

lmfao

onyx loom
#

๐Ÿ˜‚

#

justification 100

lunar cypress
#

oh i thought you were joking

prisma wave
#

I wish I was

eternal compass
#

what are Databases in InteliJ ultimate? are they like MySQL databases hosted by InteliJ for testing?

prisma wave
#

no, it can just connect into any database and visualise it

#

It's like phpmyadmin but better and in the IDE

ocean quartz
#

Also gives you syntax highlight and table/columns name completion when typing queries on strings based on the database you're connected to

eternal compass
#

ahh cool

#

@cinder flare I know this is kinda insane, but hey its worth a shot

cinder flare
#

lmao we already did it like a week ago

eternal compass
#

someone make this guy a PWA and charge the price of making a new UI ๐Ÿ˜†

#

oooh a NodeJS proxy...

obtuse gale
#

Ok

forest pecan
#

what happens when u click

obtuse gale
#

No idea

#

Not home

ocean quartz
#

It opens the link

obtuse gale
ocean quartz
#

Ikr

forest pecan
#

ur the next newton

ocean quartz
#

Nice one Dynmap

forest pecan
#

"Enabled"

#

lol

#

probably like a debug statement

humble silo
#

I love code with me but i cant imagine using it in a actual project setting

#

like for fun its great

forest pecan
#

Yeah

ocean quartz
#

Also, love the paper update ๐Ÿฅบ

humble silo
#

wow thats cool, whats the update?

obtuse gale
oak raft
#

the paper update?

ocean quartz
#

Was the one that added adventure, one of the latest builds of 1.16.5, also added a patch to fix console colors

humble silo
#

oh good point, though for alot of places they have you do it either over phone or in a google doc

oak raft
#

how tf

#

are you supposed to do it in google docs

humble silo
#

dont ask me, ive never done it like that

obtuse gale
#

Doc editing is live afaik

#

Now if you're asking "how in the world are you supposed to write code there"

#

Yeah I don't know either

humble silo
#

lol now think about over the phone

#

Im pretty sure i would practically forget how to right a basic class

oblique heath
#

tbh google docs are one step away from being the most popular browser code editor

#

all google needs to do is add code extensions

#

so that you get syntax highlighting and suggestions

humble silo
#

ya, once they add the whole IDE part of it

forest pecan
#

I hate google docs as an ide with a passion

#

the auto capitlization

ocean quartz
#

It's great for C# kekw

humble silo
#

Combine docs with IDE and thats your new name for the google product

obtuse gale
#

Lmao

forest pecan
#

ur a fucking genius

#

Why didnt i even think of that

#

lmao

cinder flare
# humble silo like for fun its great

it is quite annoying that it gives you a neutered IJ with different plugins. I wish it just let you also use normal IJ and just downloaded the files and synced them as time changes

cinder flare
humble silo
obtuse gale
ocean quartz
#

๐Ÿ˜ณ

cinder flare
humble silo
#

Lol when did you last use it?

#

As a presenter?

cinder flare
#

Literally last night

humble silo
#

ah

cinder flare
#

No as the one joining

humble silo
#

Ive always used it as a presenter

cinder flare
#

yeah it's the same for you

humble silo
#

could you edit it?

#

the project?

cinder flare
#

well yes but it doesn't let you like build a gradle project or anything useful

#

and deletion sometimes took years

#

and the host undoing undoes your changes lol

#

it's quite weird

humble silo
#

Huh thats actually kinda weird... If i had friends i would try it again :p

forest pecan
#

its only good for lectures

#

where its like code in front of you

#

lol

humble silo
#

I was looking for a r/everyonehasadifferentopinion to quote but unfortunately no one has made that yet

cinder flare
#

i mean, you can kinda edit the code

#

it's just terrible slow and unresponsive for the viewers

obtuse gale
#

Hype? ๐Ÿ‘€:eyes:๐Ÿ‘€:eyes:๐Ÿ‘€

calm marlin
#

Can I get coding help for my plugin here?

obtuse gale
supple pilot
#

hi

old wyvern
#

You need more spaces to the left of the cases

#

It must be spaced atleast after the case keyboard

#

Haskell also sadly forces a form of "indentation"

#

Alternatively you can use braces and colons

pale shell
#

When's 1.17

night canyon
#

2030

cinder flare
#

the year 3000, same as PAPI 3 and DeluxeChat Hex support

pale shell
#

Same as autosell being updated

night canyon
#

random

pale shell
#

Is clip even active here anymore?

oblique heath
#

clippy was sent to federal prison

frail glade
#

Yooo Gradle 7 came out?

ocean quartz
#

Oh shit, it did!

humble silo
#

Ive been using gradle a couple months now and i still have no idea how it works

#

I should probably learn that soon

cinder flare
#

๐Ÿ‘€ the boys vibin in Invite Only

old wyvern
#

lol

pallid gale
#

hi

#

i mean if you join one of the rooms we might move you in

#

not bedwars though

cinder flare
#

๐Ÿ‘ป spooooooky

hot hull
#

@ocean quartz wakey wakey :3

#

So I'm using

CompletableFuture.supplyAsync(() -> {
  // some code
}).thenRun(() -> {
  // some code
});

But the thenRun doesn't seem to get executed

#

@onyx loom :p

obtuse gale
#

hello ID Soul blocks deluxemenus is not valed

simple kestrel
#

Wrong channel

old wyvern
hot hull
#

Ah that might be the issue yea, made it differently now and it works so oh well

#

Is using the scheduler an okay way of handling async shit, or is there any better ways to handling it

old wyvern
#

The bukkit scheduler?

hot hull
#

yes

old wyvern
#

Do you actually just want to run something async or schedule it to run after some time?

hot hull
#

async

old wyvern
#

Either should be pretty much the same then

#

preferably just completable futures

lunar cypress
#

Depends on the task

hot hull
#

db stuff

lunar cypress
#

I would make an own thread(pool) for that

hot hull
#

Mind elaborating on that

lunar cypress
#

It's a secluded task that has barely anthing to do with Spigot so it makes sense to have an own executor

hot hull
#

Talking about java.util.concurrent.Executor correct?

lunar cypress
#

Yes

#

d;Executors

ruby craterBOT
#
public class Executors
extends Object```
Executors has 1 extensions, and  13 methods.
Description:

Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classes defined in this package. This class supports the following kinds of methods:

  • Methods that create and return an ExecutorService set up with commonly useful configuration settings.
  • Methods that create and return a ScheduledExecutorService set up with commonly useful configuration settings.
  • Methods that create and return a "wrapped" ExecutorService, that disables reconfiguration by...

This description has been shortened as it was too long.

old wyvern
#

You can use executors with completable futures as well

hot hull
#

Will play around with it, thanks

#

does hash not remain the same?

#

Used the exact same item

#

If it doesn't my whole life is a lie

old wyvern
#

Changes if you changed any of its properties that determines its hash

hot hull
#

I didn't, I just restarted the server, shouldn't it stay the same tho?

old wyvern
#

The server itself probably changes something

hot hull
#

Might need to make my own hash thingy probably

old wyvern
#

People usually use some form of uuid tag with nbt on the item I think

hot hull
#

Using it for all items, so can't really do that in this case

lunar cypress
#

Ig you could look at the hashCode() implementation to find out what's going on

old wyvern
#

What exactly are you trying to do?

hot hull
#

using the hash as the identifier for the item, since there's custom items this would be the most logical way for it not to be dependant on the implementation, gonna see if I can use the base value tho

old wyvern
#

Why do you need an identifier for all items?

hot hull
#

So I can identify it later?

old wyvern
#

Thats not what im asking frost

#

Like what you going to do individually to ALL items

hot hull
#

price

#

item worth kinda thingy

old wyvern
#

Shouldnt that normally be dependent on the material?

hot hull
#

Custom items, so no

old wyvern
#

So material and model?

hot hull
#

Need to take into account all item properties

#

Not just material

old wyvern
#

All item properties has too many variables

#

Its prone to change the hash

#

Pick out the specific values that dont change for an item and use those

hot hull
#

I can't

#

It's custom items, all items have different properties

old wyvern
#

Then this isnt the way

#

Use something other than the hash

old wyvern
hot hull
#

I keep track on all items

#

Gonna see if base64 hash value works for this

#

Since that won't change ever

old wyvern
#

Why not?

hot hull
#

base value string will always be the same

#

for that specific item

old wyvern
#

Wouldnt even something as durability be part of that?

hot hull
#

seems to work

old wyvern
#

Try damaging the item a bit

hot hull
#

custom items don't have durability so don't have to worry about that

old wyvern
#

But normal items do?

#

Like a pickaxe

hot hull
#

oh

#

Fuc

#

k

cinder flare
#

oof

#

birch log at 1/50 durability

hot hull
#

This is spigots shit

#

Should be able to just take out the durability right?

cinder flare
#

oh yeah seems like it

old wyvern
#

Check ItemMeta's hash fnction as well

cinder flare
#

what an interesting hashing algorithm

hot hull
old wyvern
#

Oh

#

I guess you should be fine then

hot hull
#

meaning that'll change

#

no?

#

since each object has a different signature

cinder flare
#

at this point just hash based on the item's name and lore lmao

old wyvern
#

true implemented by converting the internal address of the object into an integer

hot hull
#

oh yea that'd make sense yea

old wyvern
#

Frost

hot hull
#

ye?

old wyvern
#

Just use nbt

#

Easy way out

#

Does stacking destroy nbt tags?

#

ItemMeta is removed when stacking

hot hull
#

It shouldn't

old wyvern
#

Aight

hot hull
#

String's hash should always be the same for that string correct?

lunar cypress
#

yes

hot hull
#

type hash also changes after a restart

lunar cypress
#

you mean the Material hash code?

hot hull
#

yes

lunar cypress
#

that is weird

hot hull
#

It's an enum so it should be the same no?

#

It ain't pretty, but it'll work

lunar cypress
old wyvern
#

Seems hashCode of enums delegate to Object.hashCode as well

hot hull
#

hella weird

old wyvern
hot hull
old wyvern
#

Im still not convinced of using this

#

I guess time to wait and watch if collisions occur

hot hull
#

Yea

#

I mean they shouldn't

hot hull
#

This is the use case btw

old wyvern
lunar cypress
#

I'm currently testing and I get the same hash code every time

old wyvern
#

Oh? lemme check

hot hull
#

Anyone got suggestions as to how I should improve the matching thingy btw?

public static Set<ItemStack> getMatchingItems(String matcher) {
        final String comparator = matcher.toLowerCase();

        if (matcher.length() == 0)
            return ITEM_REGISTRY;

        return ITEM_REGISTRY.stream()
                .filter(it -> {
                    if (it == null) return false;
                    final ItemMeta meta = it.getItemMeta();
                    if (meta == null) return false;

                    final Component component = meta.displayName();
                    String display = component == null
                            ? WordUtils.capitalize(it.getType().name().replace("_", " "))
                            : PlainComponentSerializer.plain().serialize(component);

                    display = display.toLowerCase();

                    boolean valid = false;
                    for (final String word : display.split(" ")) {
                        if (valid) continue;
                        final int difference = StringUtils.getLevenshteinDistance(word, comparator);

                        valid = difference <= 3;
                    }

                    return valid;
                }).collect(Collectors.toSet());
    }
#

Don't cringe too hard

old wyvern
#

what in the

#

dude

#

separate your filters

hot hull
#

smh k

old wyvern
#

That filter does the job of like 5 or 6 ones xD

hot hull
#

:p

lunar cypress
#

It's basically a loop at that point

hot hull
#

sort of yea

#

don't think I can change any more, or can I?

#

I'm still not sure how a log is similar to a bush

cinder flare
#

probably close in item id

hot hull
#

@old wyvern Seems to work so neat

old wyvern
hot hull
#

However this matching is broken now, I enter dirt as the arg, and it doesn't find the dirt, like bruh

hot hull
#

smh

#

sPoOnFeEdInG

old wyvern
#

๐Ÿฅฒ

#

might wanna format that

hot hull
#

I'll rewrite

old wyvern
#

Alrighty

jovial warren
old wyvern
#

? @jovial warren

jovial warren
#

Just looks a bit complicated to me lol

old wyvern
#

oh ok

hot hull
#

Better

    public static Set<ItemStack> getMatchingItems(String matcher) {
        final String comparator = matcher.toLowerCase();

        if (matcher.length() == 0)
            return ITEM_REGISTRY;

        return ITEM_REGISTRY.stream()
                .filter(Objects::nonNull)
                .filter(ItemStack::hasItemMeta)
                .filter(it -> matches(getDisplayName(it), comparator))
                .collect(Collectors.toSet());
    }
old wyvern
#

yup

hot hull
#

How much of a difference should I be using for the matcher btw?

#

currently it's 2, but it seems to fail on exact matches

jovial warren
#

Man this just reminds me how much better Kotlin's collection extensions are than Java's streams

hot hull
#

shut up

old wyvern
#

Exact matches shouldnt fail at all

#

That would be an edit distance of 0

#

Also the threshold depends on just how close you want the matching to be

hot hull
#

I know, that's why it confuses me lol

jovial warren
old wyvern
#

Try printing out the value

old wyvern
hot hull
#

got em

jovial warren
old wyvern
jovial warren
#

Gonna have to disagree with that one

old wyvern
jovial warren
#

-_-

hot hull
#

lol

#

be gone

jovial warren
#

Java 5? You mean Java 1

prisma wave
jovial warren
#

That switch is ew

stuck harbor
#

no u

prisma wave
#

@pale shell โ˜น๏ธ

stuck harbor
#

sudge

prisma wave
#

what's wrong with calling haskell code from java

stuck harbor
#

plugins in haskell pls

#

bm u bloody better

prisma wave
#

Heh

#

I'm not sure how possible it is without making my own compiler

stuck harbor
#

and?

#

thats CS 101 bm

old wyvern
#

wdym bm

#

If you already managed to execute it

#

Oh wait

#

Yea

#

Makes sense

prisma wave
#

yeah but the way I did it is really hacky lmao

old wyvern
#

What did you do?

prisma wave
#

It just writes to a file and calls ghc lmao

old wyvern
#

You could probably use ffi

#

Might need some interfacing between both tho

prisma wave
#

Yeah I was looking into that last night

#

Im not sure it's possible for plugins or not but I'm gonna try make a PoC of Haskell<>Java with FFI and JNI

old wyvern
#

Why not?

prisma wave
#

Because you'd need to extend JavaPlugin and things, is that possible with jni?

stuck harbor
#

Good question

#

try putting haxe into the chain

#

haxe has interop with fuckin' everything

old wyvern
#

You could probably hack it by generating a class, but I was suggesting just providing hooks for events and commands

#

Wouldnt exactly be a bukkit plugin but could be fun to see it interact xD

prisma wave
#

hmm yeah that doesn't sound impossible

#

So export a haskell function for an event handler, make a jni function that calls the exported function, then implement CommandExecutor and call the native method

#

God

#

This is gonna be painful

old wyvern
#

xD

lunar cypress
prisma wave
#

that didn't take long

unkempt tangle
#

Who is skilled with reverse engineering, which I can contact per DM?

#

^ this is no ask to ask

quiet depot
#

not me i'm bad but pm me and i'll have a quick crack at it with public tools

stuck harbor
#

found what I was looking for

prisma wave
#

Why

stuck harbor
#

aye

unkempt tangle
#

even nvidia has github

hot hull
#

@old wyvern How's the visualizer going :p

stuck harbor
#

MIT/GNU Scheme is a programming language, a dialect and implementation of the language Scheme, which is a type of Lisp. It can produce native binary files for the x86 (IA-32, x86-64) processor architecture. It supports the standard R7RS mostly. It is free and open-source software released under a GNU General Public License (GPL). It was first re...

#

Nice logo

quiet depot
#

lol

#

jda

#

discord4j

#

javacord

#

probably a kotlin specific one or two aswell

lunar cypress
#

Kord

prisma wave
#

JDA with a few extension functions is better imo

stuck harbor
#

JDA always wins

old wyvern
lunar cypress
#

JDA is bloated and confusing

old wyvern
#

It should pretty much be working as of what I have rn

stuck harbor
#

ups

#

i meant

stuck harbor
#

thats better

hot hull
#

Ohh, will fix it today if I remember

prisma wave
lunar cypress
#

JDA certainly is the most mature one but idk why you wouldn't use something with native coroutines support in a Kotlin project

old wyvern
#

Just fixed an issue with message queueing in that chat app I was working on and it started sending like 100-200 messages from forever ago while testing xD

hot hull
#

lol

prisma wave
#

ok back to JNI, should i be using make to simplify the gcc commands?

#

getting pretty long already

stuck harbor
#

scheme revisions are confusing

#

like I use The Revised Revised Revised Revised Revised Revised Report on the Algorithmic Language Scheme

#

aka The Revised6 Report on the Algorithmic Language Scheme

#

aka R6RS

#

like jesus

#

stop revising it

cinder flare
#

i suggested that forever ago

stuck harbor
#

what about cmake

#

ree?

prisma wave
#

ok

#

how do i use make

#

scary

old wyvern
#

mAkE

#

Fefo might be familiar

#

@obtuse gale

prisma wave
#

interesting, a jni example i found uses something like this instead of loadLibrary

#
File sharedLibrary
            = new File("net_sukharevd_jni_example_MatrixMultiplier.so");
        System.load(sharedLibrary.getAbsolutePath());
jovial warren
#

what the actual fuck is that

old wyvern
#

listen for messages

quiet depot
#

just store made commands somewhere then check for them on ur message listener

old wyvern
#

The listener?

quiet depot
#

u don't register commands in jda

old wyvern
#

mhm

#

You could use Matts command framework

#

?mf

compact perchBOT
old wyvern
#

it might not be on the website

#

lemme just find the repo

lunar cypress
old wyvern
prisma wave
lunar cypress
#

Yeah, that's where the hack to determine file ending comes in, I just remembered

prisma wave
#

ok that makes sense

lunar cypress
#

There is a repo with a single class that does that

prisma wave
#

i'll try get loadLibrary working for now - i think the error is in the cpp file somewhere

lunar cypress
#

Starred it a while ago

hot hull
#

tf is this

old wyvern
#

Discord stages

prisma wave
#

hmm this is new

old wyvern
#

Lonely invitee

prisma wave
#

๐Ÿฅฒ

#

ok it's definitely a JNI issue, tried with System.load and i get the same UnsatisfiedLinkError

old wyvern
#

uh

#

is the space in the filename allowed?

prisma wave
#

hopefully

#

i dont see why it wouldn't be, im not using absolute paths anyway

old wyvern
#

try changeing the directory name ig

prisma wave
#

istg if that's the issue

old wyvern
#

What are these acronyms

#

๐Ÿฅฒ

lunar cypress
#

Can you send a zip/tar of the files?

prisma wave
#

i swear to god

#

yea 1 sec

prisma wave
#

changing the dir name didnt fix it

lunar cypress
#

how do i open 7z lol

prisma wave
#

7zip i think lol

#

ill do it as a tar if u want

lunar cypress
#

please some common format

prisma wave
#

i just used file manager to do it ๐Ÿฅฒ

#

i can never remember the zip or tar syntax

#

you'll need $GHC_HOME set to wherever you have GHC installed for HsFFI.h

lunar cypress
#

all right

prisma wave
#

yeah he's my boss

dawn hinge
#

Tell him I said hi

old wyvern
#

Bore-s

#

@jovial warren 96 GB RAM

prisma wave
#

@lunar cypress i got it

#

lmao

#

all I needed was #include "Library.h"

jovial warren
#
@Nullable
public static SingleTickProfiler createTickProfiler(String name) {
    return null;
}
```I think I've found the most useless method in Minecraft
lunar cypress
prisma wave
#

yeah lol

#

now i've got to get haskell working

jovial warren
prisma wave
#

java: symbol lookup error: /home/alex/Desktop/Workspace/temp/Haskell/InteropJNI/JNI/Library.so: undefined symbol: add so this is the new error

#

Calc_stub.h defines extern HsInt add(HsInt a1, HsInt a2);

#

but return add(a, b); doesn't work

old wyvern
#

@jovial warren

#

Looks like it was made in ms paint

#

@jovial warren

#

Simple Logo?

hot hull
#

I'm a professional I know

static zealot
#

smh

prisma wave
#

ok i think i might be onto something here

#

i ended up compiling the c file alongside the hs file with ghc (which seems to support similar commands to gcc), and im now getting this as an error ```
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/alex/Desktop/Workspace/temp/Haskell/InteropJNI/Haskell/libcalc.so: /home/alex/.ghcup/ghc/9.0.1/lib/ghc-9.0.1/ghc-prim-0.7.0/libHSghc-prim-0.7.0-ghc9.0.1.so: undefined symbol: stg_gc_unpt_r1

static zealot
old wyvern
#

tf

static zealot
#

I'm such an artist

static zealot
half harness
#

hduaisdjksad intellij is so annoyinggg

half harness
#

every day i always have to invalidate cache & restart because it gives a billion false errors

onyx loom
#

sounds like a you problem

half harness
#

._.

#

wat

onyx loom
#

mind blowing

#

earth rotates ๐Ÿ‘

hot hull
#

Earth isn't even real dumbass

old wyvern
#

Nah man, earth is obviously flat

onyx loom
#

ah shit my bad

old wyvern
#

same timezones everywhere