Questions tagged [fantom]

The Fantom Programming Language

Introduction

A blurb from the Fantom home page:

Fantom is designed as a practical programming language to make it easy and fun to get real work done. It is not an academic language to explore bleeding edge theories, but based on solid real world experience. During its design we set out to solve what we perceived were some real problems with Java and C#. Our background is heavily Java, but many of Java's problems are shared by C# and .NET also.

So what is it?

Design goals for and capabilities of the language include:

Portability

Write code portable to the Java VM, .NET CLR, and JavaScript in the browser.

Familiar Syntax

Java and C# programmers will feel at home with Fantom's evolutionary syntax.

Mixins

Interfaces but with implementation.

Concurrency

Tackle concurrency with built-in immutability and actor model.

Object Oriented

Everything subclasses from Obj. Value types when you need the performance.

Functional

Functions and closures are baked in.

Static and Dynamic Typing

Don't like the extremes - take the middle of the road.

Serialization

Built-in "JSON like" serialization syntax makes Fantom ideal for declarative programming too.

Elegant APIs

We're quite obsessive about providing all the key features required for a standard library, but with much less surface area than the APIs found in Java or .NET.

REST

URI literals and a unified namespace of resources identified with URIs.

...and a host of thousands.

There's lots of information about Fantom available out there.

Documentation

Learning more about Fantom is a click away.

Community

  • There's a consolidated blog list with entries ranging from discussion about the language to announcements of releases.
  • There's a ticket system for reporting and reviewing bugs, feature requests, etc. (It also serves to demonstrate the responsiveness of the creators.)
  • There's a discussion board for sharing opinions, tips, complaints, etc.
  • There's an IRC channel with helpful people. (It can be a bit slow. Be patient.)
62 questions
1
vote
1 answer

Why afBedSheet application throws 'Service does not exist for Type afBedSheet::Routes'

Using the example from afBedSheet's documentation: using afIoc using afBedSheet class HelloPage { Text hello(Str name, Int iq := 666) { return Text.fromPlain("Hello! I'm $name and I have an IQ of $iq!") } } class AppModule { @Contribute…
LightDye
  • 1,234
  • 11
  • 15
1
vote
1 answer

Why afIoc doesn't inject the service in this case?

I'm trying to create a very simple app using the IoC framework for Fantom afIoc to become familiar with it. I tried this... using afIoc class Main { Registry registry := IocService([AppModule#]).start.registry @Inject myPod::Version?…
LightDye
  • 1,234
  • 11
  • 15
1
vote
1 answer

How to change the target folder for afFancordion results?

When I run afConcordion fixtures within my Fantom project, the generated fixtures end up in this folder: $FAN_HOME/temp/concordion/no-name But I'd like them to be written in a folder called target under my project's folder. Looking at afConcordion…
LightDye
  • 1,234
  • 11
  • 15
1
vote
1 answer

ERROR: cannot init Sys.homeDir running a Fantom app based on afBedSheet on Mac OS X

Following the instructions from Alien Factory's afBedNap to build a web app using the afBedSheet framework for Fantom I got this error at the end of step 3 (running the app): $ fan myAfBedNap [09:37:54 03-Aug-14] [info] [afBedSheet] Starting…
LightDye
  • 1,234
  • 11
  • 15
1
vote
1 answer

Does afBedSheet provide facets to tag classes as Services and methods as Route handlers?

I'm playing with Fantom's afBedSheet framework and in its documentation here, the example goes... using afIoc using afBedSheet class HelloPage { Text hello(Str name, Int iq := 666) { return Text.fromPlain("Hello! I'm $name and I have an IQ of…
LightDye
  • 1,234
  • 11
  • 15
1
vote
1 answer

preventing fantomide from exporting libs

I need to use fantom for a University project. I downloaded the fantom environment, and fantomIDE to go with it. It all works great. My problem: I have created a project named test to test some things and check all goes and runs. When I checked the…
elyashiv
  • 3,623
  • 2
  • 29
  • 52
1
vote
1 answer

Dynamically evaluating code at runtime

Is it possible to take a string/AST of source code and evaluate it (like eval()) at runtime in Fantom? I found some suggesting features in the documentation but not obvious evidence.
ThePiercingPrince
  • 1,873
  • 13
  • 21
1
vote
1 answer

How can I make Fanbatis @Column annotation to map Fantom class attribute to DB column correctly?

I'm using Fanbatis framework to access a MySQL database. The documentation here: http://www.talesframework.org/fanbatis/ says that I can use the @Column annotation to map a class attribute to a column with a different name: @Column{name="xx"} - By…
LightDye
  • 1,234
  • 11
  • 15
1
vote
2 answers

F4 IDE gives "Invalid Uri scheme for local file" when running Fantom app

I started a very simple project using Xored's F4 IDE for Fantom. The first few times I ran it there was no error, but I started adding dependencies (fanbatis) and at some point the error below starting showing up every time I run a test or a dummy…
LightDye
  • 1,234
  • 11
  • 15
1
vote
2 answers

Does Fantom support JSR-223?

Does the Fantom programming language, either directly or via a third-party implementation, support JSR-223? That is, can Fantom be used to script Java objects via the 'javax.script' API?
Paul
  • 3,009
  • 16
  • 33
0
votes
1 answer

Hey Can someone explain something about this Smart contract to me - LP Staking Contract

hey so i was looking through github for a LP staking smart contract and i came across this // SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import…
James
  • 1
0
votes
1 answer

Problem with downloading F4 IDE (Mac IOS)

I am working on a project based on the Fantom language. But I can't download it because of the "metadata/.log." problem. I understand that I have to delete this file The problem is that I don't find in the folder where I saved the project When I…
0
votes
1 answer

Getting the data between XML tags in Fantom

I am having some trouble with the XParser class in Fantom, I am trying to get at the data between the tags in XML. There's one that gets the type of data but I'm having trouble with the one that will get the actual data. Thank you!
clive alton
  • 131
  • 1
  • 8
0
votes
2 answers

What's the best way to append a StrBuf to a StrBuf?

I have a series of StrBuf objects and want to know the most efficient way to concatenate them together. There's the add() method but the docs say, "Add x.toStr to the end of this buffer". If I'm doing this over and over and over again, I'd imagine…
Steve Eynon
  • 4,979
  • 2
  • 30
  • 48
0
votes
1 answer

How can I hide the command prompt in my FWT application?

I'm creating an FWT application in Fantom, and every time I run my application, the MS-DOS command prompt window appears (as well as my main application form). I don’t want this MS-DOS window to be shown. How can I get rid of it?
jay_t55
  • 11,362
  • 28
  • 103
  • 174