Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 05 20:47
    ericdriggs commented #7454
  • Feb 11 03:56
    dependabot[bot] labeled #7472
  • Feb 11 03:56
    dependabot[bot] opened #7472
  • Feb 11 03:56

    dependabot[bot] on maven

    Bump json-smart from 1.3.1 to 1… (compare)

  • Dec 08 2021 10:05
    supersache opened #7471
  • Oct 01 2021 12:51
    l7rf1i82 commented #7464
  • Oct 01 2021 12:51
    l7rf1i82 commented #7464
  • Oct 01 2021 12:49
    l7rf1i82 commented #7464
  • Sep 30 2021 08:21
    l7rf1i82 closed #528
  • Sep 30 2021 08:21
    l7rf1i82 commented #528
  • Sep 29 2021 08:05
    l7rf1i82 opened #528
  • Jun 19 2021 01:40
    kingjon3377 opened #527
  • Jun 19 2021 01:35
    kingjon3377 opened #526
  • Jun 04 2021 01:23

    dependabot[bot] on maven

    (compare)

  • Jun 04 2021 01:23
    dependabot[bot] closed #7456
  • Jun 04 2021 01:23
    dependabot[bot] commented #7456
  • Jun 04 2021 01:23
    dependabot[bot] labeled #7470
  • Jun 04 2021 01:23
    dependabot[bot] opened #7470
  • Jun 04 2021 01:23

    dependabot[bot] on maven

    Bump httpclient from 4.3.2 to 4… (compare)

  • May 06 2021 15:49
    jvasileff closed #7469
kiti_Nomad
@Kiti-Nomad
is it right
John Vasileff
@jvasileff
@kiti-nomad this channel is for discussions about the Ceylon language. I believe you'll find better responses to questions regarding Java and specific JVMs in forums dedicated to those technologies
kiti_Nomad
@Kiti-Nomad
ok
Roland Tepp
@luolong

@kiti-nomad what John told is correct, but in short, AOT stands for “Ahead of Time” compilation and JIT stands for “Just in time compilation”.
The main difference is when the compiler generates specific machine code instructions and performs optimisations.

With AOT, the compiler generates architecture specific binary before a single line of code is executed—i.e. Ahead of (execution) Time. The optimizations that a compiler can do at that time are extensive, but can not accout for runtime characteristics of the particular program.

With JIT, the compiler starts out by interpreting the code when first executed and as it gets more info on the runtime characteristics of the code, it starts replacing bits of the interpreted runtime with architecture specific machine instructions, applying optimizations as it is running the code. Effectively, creating optimized set of instructions Just in the time (of execution).

Wojciech Potiopa
@Voiteh
herd is down could someone look into it ?
Pedro Lamarão
@pedrolamarao
Hello all! I'm emerging from a long work sprint. I will invest more time in the nexts months on Ceylon. It seems 1.4.0 is well underway. I'll update my samples to the new version and see how it goes.
Pedro Lamarão
@pedrolamarao
Should I build from source or get a prebuilt package? I no longer remember how to build but have time to invest on this (and perhaps help debug the build).
Umar Ali
@karimiumar
Is it possible in Ceylon?

` public interface Condition {
Condition FALSE = facts -> false;
Boolean evaluate(Fact<?> fact);
default Condition and(Condition other) {
return fact -> this.evaluate(fact) && other.evaluate(fact);
}

default Condition or(Condition other) {
    return fact -> this.evaluate(fact) || other.evaluate(fact);
}

default Condition not() {
    return fact -> !this.evaluate(fact);
}

} @Test
public void testCondition() {
String str = "A String";
Condition a = fact -> !str.isBlank();
Condition b = fact -> str.contains("A");
a.and(b);
}`

Wojciech Potiopa
@Voiteh
interface Condition<Fact>{

    shared static Condition<Fact> falseCondition => object satisfies Condition<Fact> {
        shared actual Boolean evaluate(Fact fact) => false;
    };
    shared static Condition<Data >create<Data>(Boolean(Data) evala)=> object satisfies Condition<Data>{
        shared actual Boolean evaluate(Data fact) => evala(fact);
    };

    shared formal Boolean evaluate(Fact fact);

    shared default Condition<Fact> and(Condition<Fact> other)=> object satisfies Condition<Fact>{
        shared actual Boolean evaluate(Fact fact) => this.evaluate(fact) && other.evaluate(fact);

    };

    shared default Condition<Fact> or(Condition<Fact> other)=> object satisfies Condition<Fact>{
         shared actual Boolean evaluate(Fact fact) => this.evaluate(fact) || other.evaluate(fact);
    };

    shared default Condition<Fact> not=> object satisfies Condition<Fact>{
        shared actual Boolean evaluate(Fact fact) => !this.evaluate(fact); 

    };

}
shared test void testConditions(){
    value a=Condition.create<String>((String fact) => !fact.empty);
    value b=Condition.create<String>((String fact)=> fact.contains("A"));
    value result=a.and(b).evaluate("A string");
    assert(result);
}
You may take out Condition.create as top level function so You don't have to prefix it
Wojciech Potiopa
@Voiteh
It could be simplified a bit if You would not pass condition to and and or but function reference like in create so it would be:
interface Condition<Fact>{

    shared static Condition<Fact> falseCondition => object satisfies Condition<Fact> {
        shared actual Boolean evaluate(Fact fact) => false;
    };
    shared static Condition<Data >create<Data>(Boolean(Data) evala)=> object satisfies Condition<Data>{
        shared actual Boolean evaluate(Data fact) => evala(fact);
    };

    shared formal Boolean evaluate(Fact fact);

    shared default Condition<Fact> and(Boolean(Fact) other)=> object satisfies Condition<Fact>{
        shared actual Boolean evaluate(Fact fact) => this.evaluate(fact) && other(fact);

    };

    shared default Condition<Fact> or(Boolean(Fact) other)=> object satisfies Condition<Fact>{
         shared actual Boolean evaluate(Fact fact) => this.evaluate(fact) || other(fact);
    };

    shared default Condition<Fact> not=> object satisfies Condition<Fact>{
        shared actual Boolean evaluate(Fact fact) => !this.evaluate(fact); 

    };

}
shared test void testConditions(){
    value a=Condition.create<String>((String fact) => !fact.empty);
    value b=((String fact)=> fact.contains("A"));
    value result=a.and(b).evaluate("A string");
    assert(result);
}
Umar Ali
@karimiumar
@Voiteh Thank you.
Wojciech Potiopa
@Voiteh
the second option wont work if You would b.and(a) because b is now just a function and not Condition
probably there is a way to make it less verbose but i don't know the syntax
Umar Ali
@karimiumar
Ok
Umar Ali
@karimiumar

Does ceylon-1.3.3 support static interface member? I'm frequently getting following exception:

Ceylon backend error: method does not override or implement a method from a supertype
Some classes are missing from the generated module archives, probably because of an error in the Java backend compilation.

This is the case both from CLI and IDE-eclipse(oxygen) & IntelliJ-2017.2. JDK is 1.8.0_202 on Windows 7

Wojciech Potiopa
@Voiteh
it does but it's buggy as You see
Wojciech Potiopa
@Voiteh
You can use top level functions they more bug free from my experience
kiti_Nomad
@Kiti-Nomad
do you know this?
Saigut
@Saigut
Hey, what is the difference between and Streams and Sequences? Aren't they both the sequence of data?
msx80
@msx80
I think streams are a more generic abstraction, they define something that can be iterated, possibly lazily, including infinite series of values. Sequences are more like regular arrays or lists, ie materialized serie of actual data.
Sequences extends streams (Iterables)
David Festal
@davidfestal
Exactly
zamfofex
@zamfofex

Hello once again, everyone! I hope you all have been doing well!

To anyone who might still frequent this channel: I don’t know if it’s of interest to anyone, but I wanted to mention that I decided to spend some time today generating a native image for my old solitaire game with GraalVM. It took me a while to figure it out, but it seems everything is working fine now!

I have been really looking forward to start playing around with Ceylon again! I don’t care if the project has been going slow lately, I just want to be able to actually enjoy a programming language again for once! And Ceylon is such a nice language, I feel like it’s difficult to not enjoy it. :blush:

I wish a great end of year to whomever here cares about the Gregorian calendar! :tada: All the best!

zamfofex
@zamfofex
Here’s the executable!
unxz < solitaire.xz > solitaire
chmod +x solitaire
./solitaire
kiti_Nomad
@Kiti-Nomad
新春快乐!
kiti_Nomad
@Kiti-Nomad
祝大伙儿身体健康,万事如意,心想事成,财源滚滚!
Jonas Berlin
@xkr47
@zamfofex nice! :)
I have been getting enthusiastic about the Rust language lately
ShalokShalom
@ShalokShalom
Hi there :)
OCaml has a higher order module system and I considered it as the most advanced module system because of this, since it allows for structures that not even Haskell allows with its type classes.
Now I read on the announcement post of Ceylon becoming an official project of the Eclipse post, that Ceylon "has the most sophisticated and cleanly-integrated module system of any programming language."
kiti_Nomad
@Kiti-Nomad
Ocaml is a great language, I found it in many new languages, even F# looks exactly like Ocaml
Stéphane Épardaud
@FroMage
Hi, please note that the Ceylon module repository is likely to be taken offline real soon. Let me know if you find this unacceptable and want to discuss hosting options. Sorry about this.
MikhailMalyutin
@MikhailMalyutin
@FroMage - one question. We have own local herd, but then we try to compile out projects it try to ose central herd and we have big timeout. Is it possible to change config to not use central herd?
MikhailMalyutin
@MikhailMalyutin
I know about ceylon compile --offline, but i want to download artifact from our herd server
zamfofex
@zamfofex
Someone shared this on a Discord server I’m a part of: https://github.com/fsharp/fslang-suggestions/issues/243#issuecomment-916079347 I felt like some people here might find it interesting.
image.png
I wrote my thoughts about it, and defended Ceylon as a language I consider interesting in that regard!
kiti_Nomad
@Kiti-Nomad
Many people always do, feel that their girlfriend or wife is not young enough, chest is not big enough, buttocks are not big enough. Not high enough, face not round enough, nose beam not high enough... But if he did swap his girlfriend or wife for the woman of his dreams, he wouldn't
I've seen in reality that a lot of people always reject languages, but they don't give up the languages they've mastered
kiti_Nomad
@Kiti-Nomad
I mean, as long as something doesn't look so bad, then it has a very fascinating point that's enough to survive. You should consider how to make ceylon have a very obsessive point compared to other jvm languages