[frege-programming-language] Re: Android application in Frege & Frege Android

2016-11-27 Thread Michael Chavinda
Building on the work done by Patrick I've managed to get an app working 
only in Frege. I'll keep working on it to help integrate it into the 
Android system at large and eventually make a plugin.

https://github.com/mchav/FregeAndroid

On Saturday, October 8, 2016 at 12:27:14 AM UTC-4, Patrick Pelletier wrote:
>
> I've published a complete, working sample project here: 
>
> https://github.com/ppelleti/frege-on-android 
>
> based on the build.gradle snippet that Andreas sent out earlier.  I 
> wasn't able to call the Android API from Frege, because the FregeAndroid 
> wrapper turns out to be missing files.  But I can call Frege code from 
> the Java code in an Android app just fine. 
>
> --Patrick 
>
>
> On 10/7/16 1:11 AM, 'Andreas Ländle' via Frege Programming Language wrote: 
> > Hi Barry, 
> > unfortunately I have no sample project that I could publish. But maybe 
> > we could support you if you give us more details about the things you 
> > are struggling with? 
> > Br, 
> > Andreas 
> > 
> > Am Samstag, 1. Oktober 2016 23:02:16 UTC+2 schrieb Barry Burd: 
> > 
> > Andreas, 
> > You say that Frege works with JDK7. Can you post explicit 
> > instructions describing what you did? I'd really like to get it 
> > working for myself. 
> > Thanks. 
> >   --Barry 
> > 
> > On Tuesday, September 13, 2016 at 3:49:23 AM UTC-4, Andreas Ländle 
> > wrote: 
> > 
> > Hi, 
> > I can confirm that frege works under Android in conjunction 
> > with JDK7 and newer Android API Levels - at least I didn't 
> > face any problems ;-) 
> > Currently I'm trying to use JDK8 with the new Android Jack 
> > Compiler - but I'm struggling with all the unicode (e.g. greek 
> > letters) identifiers not supported with Jack. 
> > So I'm trying to build a latin-only version of the 
> > fregec.jar... seems to be more complicated than I've expected 
> ;-( 
> > Br, 
> > Andreas 
> > 
> > Am Dienstag, 13. September 2016 09:06:46 UTC+2 schrieb Patrick 
> > Pelletier: 
> > 
> > Never mind, I think I've been approaching it wrong. 
> >  ExecutorService was 
> > never the problem with Java 6, it was ForkJoinPool. 
> > 
> > However, Android has ForkJoinPool starting in API level 21: 
> > 
> > 
> https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html
>  
> > <
> https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html>
>  
>
> > 
> > 
> > So, perhaps the Java 6 version of Frege is no longer 
> > needed for 
> > Android.  I will try to see if I can make some progress 
> > under that 
> > assumption. 
> > 
> > --Patrick 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Frege Programming Language" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to 
> > frege-programming-language+unsubscr...@googlegroups.com  
> >  >. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-10-07 Thread Patrick Pelletier

I've published a complete, working sample project here:

https://github.com/ppelleti/frege-on-android

based on the build.gradle snippet that Andreas sent out earlier.  I 
wasn't able to call the Android API from Frege, because the FregeAndroid 
wrapper turns out to be missing files.  But I can call Frege code from 
the Java code in an Android app just fine.


--Patrick


On 10/7/16 1:11 AM, 'Andreas Ländle' via Frege Programming Language wrote:

Hi Barry,
unfortunately I have no sample project that I could publish. But maybe 
we could support you if you give us more details about the things you 
are struggling with?

Br,
Andreas

Am Samstag, 1. Oktober 2016 23:02:16 UTC+2 schrieb Barry Burd:

Andreas,
You say that Frege works with JDK7. Can you post explicit
instructions describing what you did? I'd really like to get it
working for myself.
Thanks.
  --Barry

On Tuesday, September 13, 2016 at 3:49:23 AM UTC-4, Andreas Ländle
wrote:

Hi,
I can confirm that frege works under Android in conjunction
with JDK7 and newer Android API Levels - at least I didn't
face any problems ;-)
Currently I'm trying to use JDK8 with the new Android Jack
Compiler - but I'm struggling with all the unicode (e.g. greek
letters) identifiers not supported with Jack.
So I'm trying to build a latin-only version of the
fregec.jar... seems to be more complicated than I've expected ;-(
Br,
Andreas

Am Dienstag, 13. September 2016 09:06:46 UTC+2 schrieb Patrick
Pelletier:

Never mind, I think I've been approaching it wrong.
 ExecutorService was
never the problem with Java 6, it was ForkJoinPool.

However, Android has ForkJoinPool starting in API level 21:


https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html




So, perhaps the Java 6 version of Frege is no longer
needed for
Android.  I will try to see if I can make some progress
under that
assumption.

--Patrick


--
You received this message because you are subscribed to the Google 
Groups "Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to 
frege-programming-language+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-10-06 Thread 'Andreas Ländle' via Frege Programming Language
Hi Barry,
unfortunately I have no sample project that I could publish. But maybe we 
could support you if you give us more details about the things you are 
struggling with?
Br,
Andreas

Am Samstag, 1. Oktober 2016 23:02:16 UTC+2 schrieb Barry Burd:
>
> Andreas,
> You say that Frege works with JDK7. Can you post explicit instructions 
> describing what you did? I'd really like to get it working for myself.
> Thanks.
>   --Barry
>
> On Tuesday, September 13, 2016 at 3:49:23 AM UTC-4, Andreas Ländle wrote:
>>
>> Hi, 
>> I can confirm that frege works under Android in conjunction with JDK7 and 
>> newer Android API Levels - at least I didn't face any problems ;-)
>> Currently I'm trying to use JDK8 with the new Android Jack Compiler - but 
>> I'm struggling with all the unicode (e.g. greek letters) identifiers not 
>> supported with Jack.
>> So I'm trying to build a latin-only version of the fregec.jar... seems to 
>> be more complicated than I've expected ;-(
>> Br,
>> Andreas
>>
>> Am Dienstag, 13. September 2016 09:06:46 UTC+2 schrieb Patrick Pelletier:
>>>
>>> Never mind, I think I've been approaching it wrong.  ExecutorService was 
>>> never the problem with Java 6, it was ForkJoinPool. 
>>>
>>> However, Android has ForkJoinPool starting in API level 21: 
>>>
>>>
>>> https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html
>>>  
>>>
>>> So, perhaps the Java 6 version of Frege is no longer needed for 
>>> Android.  I will try to see if I can make some progress under that 
>>> assumption. 
>>>
>>> --Patrick 
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-10-01 Thread Barry Burd
Andreas,
You say that Frege works with JDK7. Can you post explicit instructions 
describing what you did? I'd really like to get it working for myself.
Thanks.
  --Barry

On Tuesday, September 13, 2016 at 3:49:23 AM UTC-4, Andreas Ländle wrote:
>
> Hi, 
> I can confirm that frege works under Android in conjunction with JDK7 and 
> newer Android API Levels - at least I didn't face any problems ;-)
> Currently I'm trying to use JDK8 with the new Android Jack Compiler - but 
> I'm struggling with all the unicode (e.g. greek letters) identifiers not 
> supported with Jack.
> So I'm trying to build a latin-only version of the fregec.jar... seems to 
> be more complicated than I've expected ;-(
> Br,
> Andreas
>
> Am Dienstag, 13. September 2016 09:06:46 UTC+2 schrieb Patrick Pelletier:
>>
>> Never mind, I think I've been approaching it wrong.  ExecutorService was 
>> never the problem with Java 6, it was ForkJoinPool. 
>>
>> However, Android has ForkJoinPool starting in API level 21: 
>>
>>
>> https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html
>>  
>>
>> So, perhaps the Java 6 version of Frege is no longer needed for 
>> Android.  I will try to see if I can make some progress under that 
>> assumption. 
>>
>> --Patrick 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-29 Thread 'Andreas Ländle' via Frege Programming Language
Btw, I've send the frege java sources to the android project for further 
investigation on the jack compiler misbehavior - 
https://code.google.com/p/android/issues/detail?id=211164
Frege seems to be an excellent project to verify the correctness of java 
compilers ;-)

Am Dienstag, 13. September 2016 15:30:47 UTC+2 schrieb Andreas Ländle:
>
> Just to share some intermediate results - if someone is interested. If you 
> apply the attached patches you'll should be able to create a fregec.jar - 
> and if you extract all the java sources from it (e.g. with "7z x fregec.jar 
> -r *.java -x!Awt.java -x!Swing.java -x!frege\compiler\* -x!frege\tools\* 
> -x!Modules.java -x!Processes.java -x!frege\ide\* -x!frege\test\*" or a 
> similar tool) you could at least compile with jack without any "invalid 
> character" error.
>
> Unfortunately it sill fails...
>
> Error:Gradle: Execution failed for task 
> ':app:transformJackWithJackForDebug'.
> > com.android.sched.scheduler.RunnerProcessException: Error during 
> 'TypeLegalizer' runner on 'public java.lang.Object 
> frege.data.JSON$1Let$26446$-frege_prelude_PreludeBase$TList_string$8750_int_arg$3_frege_prelude_PreludeBase$TList_arg$4_LambdaImpl0.call()':
>  
> Unexpected error during visit: com.android.jack.ir.ast.JMethodCall at 
> "Unknown source info"
>
> Likely a bug in the jack compiler, since we gave it valid java sources; 
> but this might be a good start for anybody that wants a frege package only 
> containing ascii identifiers (for whatever reason).
>
> Br, Andreas
>
> Am Dienstag, 13. September 2016 09:49:23 UTC+2 schrieb Andreas Ländle:
>>
>> Hi, 
>> I can confirm that frege works under Android in conjunction with JDK7 and 
>> newer Android API Levels - at least I didn't face any problems ;-)
>> Currently I'm trying to use JDK8 with the new Android Jack Compiler - but 
>> I'm struggling with all the unicode (e.g. greek letters) identifiers not 
>> supported with Jack.
>> So I'm trying to build a latin-only version of the fregec.jar... seems to 
>> be more complicated than I've expected ;-(
>> Br,
>> Andreas
>>
>> Am Dienstag, 13. September 2016 09:06:46 UTC+2 schrieb Patrick Pelletier:
>>>
>>> Never mind, I think I've been approaching it wrong.  ExecutorService was 
>>> never the problem with Java 6, it was ForkJoinPool. 
>>>
>>> However, Android has ForkJoinPool starting in API level 21: 
>>>
>>>
>>> https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html
>>>  
>>>
>>> So, perhaps the Java 6 version of Frege is no longer needed for 
>>> Android.  I will try to see if I can make some progress under that 
>>> assumption. 
>>>
>>> --Patrick 
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Patrick Pelletier

On 9/23/16 6:39 PM, Patrick Pelletier wrote:

Sure, here is the build output with -v.


Sorry I didn't figure this out sooner!  It looks like the modules it 
didn't find...


Android.view.ActionMode: build failed because module is not on class path
Android.view.DragEvent: build failed because module is not on class path
Android.text.Spannable: build failed because module is not on class path
Android.text.Editable: build failed because module is not on class path
Android.text.TextUtils: build failed because module is not on class path
Android.content.res.Resources: build failed because module is not on 
class path

Android.os.Bundle: build failed because module is not on class path
Android.os.UserHandle: build failed because module is not on class path
Android.graphics.Typeface: build failed because module is not on class path
Android.widget.Scroller: build failed because module is not on class path
Android.graphics.Bitmap: build failed because module is not on class path
Android.net.Uri: build failed because module is not on class path
Android.graphics.PorterDuff: build failed because module is not on class 
path

Java.io.File: build failed because module is not on class path
Android.content.BroadcastReceiver: build failed because module is not on 
class path

Java.lang.Runnable: build failed because module is not on class path
Java.io.IOException: build failed because module is not on class path
Android.graphics.Canvas: build failed because module is not on class path
Android.graphics.ColorFilter: build failed because module is not on 
class path

Android.graphics.Region: build failed because module is not on class path
Java.lang.Thread: build failed because module is not on class path
Android.view.KeyCharacterMap: build failed because module is not on 
class path
Android.util.DisplayMetrics: build failed because module is not on class 
path

Android.os.Message: build failed because module is not on class path

...are indeed not present in the FregeAndroid repo:

https://github.com/trilogysci/FregeAndroid

So I guess this just means that FregeAndroid is not usable in its 
current form?  Sorry I've wasted everyone's time on this!


--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Patrick Pelletier

On 9/23/16 2:37 PM, Ingo W. wrote:

Can you add -v to the compiler options. Hopefully we can see a bit more
then.


Sure, here is the build output with -v.

--Patrick

--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
whiteandnerdy:frege-on-android ppelleti$ ./gradlew assemble
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:preReleaseBuild UP-TO-DATE
:prepareComAndroidSupportMultidex100Library
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:mergeDebugAssets
:generateDebugResValues UP-TO-DATE
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard
:compileDebugJavaWithJavac
Frege compiler args: "-v -inline -d src/frege -make -fp 
/Users/ppelleti/Library/Android/sdk/platforms/android-21/android.jar -sp 
FregeAndroid/src:src/main/frege 
src/main/frege/org/funwithsoftware/frege_example/FregeCode.fr"
parsing src/main/frege/org/funwithsoftware/frege_example/FregeCode.fr
parsing FregeAndroid/src/frege/android/widget/TextView.fr
Prelude.PreludeMonad: no rebuild needed because module exists on class path and 
no source available.
Prelude.PreludeIO: no rebuild needed because module exists on class path and no 
source available.
Prelude.PreludeArrays: no rebuild needed because module exists on class path 
and no source available.
Java.util.Regex: no rebuild needed because module exists on class path and no 
source available.
Prelude.PreludeText: no rebuild needed because module exists on class path and 
no source available.
Prelude.PreludeList: no rebuild needed because module exists on class path and 
no source available.
frege.Prelude: no rebuild needed because module exists on class path and no 
source available.
parsing FregeAndroid/src/frege/android/content/Context.fr
parsing FregeAndroid/src/frege/android/graphics/Rect.fr
parsing FregeAndroid/src/frege/android/graphics/drawable/Drawable.fr
parsing FregeAndroid/src/frege/android/util/AttributeSet.fr
parsing FregeAndroid/src/frege/android/view/KeyEvent.fr
parsing FregeAndroid/src/frege/android/view/MotionEvent.fr
parsing FregeAndroid/src/frege/java/util/Locale.fr
Prelude.PreludeBase: no rebuild needed because module exists on class path and 
no source available.
Android.view.ActionMode: build failed because module is not on class path
Android.view.DragEvent: build failed because module is not on class path
parsing FregeAndroid/src/frege/android/content/Intent.fr
parsing FregeAndroid/src/frege/android/content/SharedPreferences.fr
parsing FregeAndroid/src/frege/android/content/pm/PackageManager.fr
Android.text.Spannable: build failed because module is not on class path
parsing FregeAndroid/src/frege/android/content/res/Configuration.fr
Android.text.Editable: build failed because module is not on class path
Android.text.TextUtils: build failed because module is not on class path
Android.content.res.Resources: build failed because module is not on class path
parsing FregeAndroid/src/frege/android/os/Handler.fr
Android.os.Bundle: build failed because module is not on class path
parsing FregeAndroid/src/frege/android/os/Looper.fr
parsing FregeAndroid/src/frege/android/view/Display.fr
Android.os.UserHandle: build failed because module is not on class path
Android.graphics.Typeface: build failed because module is not on class path
Android.widget.Scroller: build failed because module is not on class path
Android.util.AttributeSet: compiling because class file doesn't exist
Android.graphics.Bitmap: build failed because module is not on class path
Android.net.Uri: build failed because module is not on class path
Android.graphics.PorterDuff: build failed because module is not on class path
Java.io.File: build failed because module is not on class path
Android.content.BroadcastReceiver: build failed because module is not on class 
path
Java.lang.Runnable: build failed because module is not on class path
Java.util.Locale: compiling because class file doesn't exist
Android.graphics.Rect: compiling because class file doesn't exist
Java.io.IOException: build failed because module is not on class path
Android.graphics.Canvas: build failed because module is not on class path
Android.graphics.ColorFilter: build failed because module is not on class path
parsing FregeAndroid/src/frege/android/graphics/Point.fr
Android.graphics.Region: build failed because module is not on class path
parsing FregeAndroid/src/frege/android/graphics/Matrix.fr
Java.lang.Thread: build failed because module is not on class path
Android.content.SharedPreferences: compi

[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Ingo W.
Looks good.
This should indeed compile the wrappers.
Can you add -v to the compiler options. Hopefully we can see a bit more 
then.
Oh, and make sure the destination directory src/frege is empty before you 
run it.

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Patrick Pelletier

On 9/23/16 5:35 AM, Ingo W. wrote:

I'd really like to see the output of the following shell script:

cd FregeAndroid/src
find . -type f -name '*.fr' -exec egrep 'module|package' {} /dev/null ';'


Here it is, as an attachment.

--Patrick

--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
./frege/android/animation/TimeInterpolator.fr:package 
frege.android.animation.TimeInterpolator where
./frege/android/app/Activity.fr:package frege.android.app.Activity where
./frege/android/app/DownloadManager.fr:package 
frege.android.app.DownloadManager where
./frege/android/content/Context.fr:package frege.android.content.Context where
./frege/android/content/DialogInterface.fr:package 
frege.android.content.DialogInterface where
./frege/android/content/Intent.fr:package frege.android.content.Intent where
./frege/android/content/Intent.fr:  pure native extra_assist_package 
android.content.Intent.EXTRA_ASSIST_PACKAGE :: String
./frege/android/content/Intent.fr:  pure native action_install_package 
android.content.Intent.ACTION_INSTALL_PACKAGE :: String
./frege/android/content/Intent.fr:  pure native extra_installer_package_name 
android.content.Intent.EXTRA_INSTALLER_PACKAGE_NAME :: String
./frege/android/content/Intent.fr:  pure native action_uninstall_package 
android.content.Intent.ACTION_UNINSTALL_PACKAGE :: String
./frege/android/content/Intent.fr:  pure native action_package_install 
android.content.Intent.ACTION_PACKAGE_INSTALL :: String
./frege/android/content/Intent.fr:  pure native action_package_added 
android.content.Intent.ACTION_PACKAGE_ADDED :: String
./frege/android/content/Intent.fr:  pure native action_package_replaced 
android.content.Intent.ACTION_PACKAGE_REPLACED :: String
./frege/android/content/Intent.fr:  pure native action_my_package_replaced 
android.content.Intent.ACTION_MY_PACKAGE_REPLACED :: String
./frege/android/content/Intent.fr:  pure native action_package_removed 
android.content.Intent.ACTION_PACKAGE_REMOVED :: String
./frege/android/content/Intent.fr:  pure native action_package_fully_removed 
android.content.Intent.ACTION_PACKAGE_FULLY_REMOVED :: String
./frege/android/content/Intent.fr:  pure native action_package_changed 
android.content.Intent.ACTION_PACKAGE_CHANGED :: String
./frege/android/content/Intent.fr:  pure native action_package_restarted 
android.content.Intent.ACTION_PACKAGE_RESTARTED :: String
./frege/android/content/Intent.fr:  pure native action_package_data_cleared 
android.content.Intent.ACTION_PACKAGE_DATA_CLEARED :: String
./frege/android/content/Intent.fr:  pure native action_package_first_launch 
android.content.Intent.ACTION_PACKAGE_FIRST_LAUNCH :: String
./frege/android/content/Intent.fr:  pure native 
action_package_needs_verification 
android.content.Intent.ACTION_PACKAGE_NEEDS_VERIFICATION :: String
./frege/android/content/Intent.fr:  pure native action_package_verified 
android.content.Intent.ACTION_PACKAGE_VERIFIED :: String
./frege/android/content/Intent.fr:  pure native action_manage_package_storage 
android.content.Intent.ACTION_MANAGE_PACKAGE_STORAGE :: String
./frege/android/content/Intent.fr:  pure native extra_changed_package_list 
android.content.Intent.EXTRA_CHANGED_PACKAGE_LIST :: String
./frege/android/content/Intent.fr:  pure native flag_exclude_stopped_packages 
android.content.Intent.FLAG_EXCLUDE_STOPPED_PACKAGES :: Int
./frege/android/content/Intent.fr:  pure native flag_include_stopped_packages 
android.content.Intent.FLAG_INCLUDE_STOPPED_PACKAGES :: Int
./frege/android/content/Intent.fr:  pure native fill_in_package 
android.content.Intent.FILL_IN_PACKAGE :: Int
./frege/android/content/pm/PackageManager.fr:package 
frege.android.content.pm.PackageManager where
./frege/android/content/pm/PackageManager.fr:  pure native 
get_uninstalled_packages 
android.content.pm.PackageManager.GET_UNINSTALLED_PACKAGES :: Int
./frege/android/content/pm/PackageManager.fr:  pure native 
signature_unknown_package 
android.content.pm.PackageManager.SIGNATURE_UNKNOWN_PACKAGE :: Int
./frege/android/content/res/Configuration.fr:package 
frege.android.content.res.Configuration where
./frege/android/content/SharedPreferences.fr:package 
frege.android.content.SharedPreferences where
./frege/android/database/sqlite/SQLiteOpenHelper.fr:package 
frege.android.database.sqlite.SQLiteOpenHelper where
./frege/android/gesture/GestureOverlayView.fr:package 
frege.android.gesture.GestureOverlayView where
./frege/android/graphics/drawable/Drawable.fr:package 
frege.android.graphics.drawable.Drawable where
./frege/android/graphics/drawable/ShapeDrawable.fr:package 
frege.android.graphics.drawable.ShapeDrawable where
./frege/android/graphics/drawable/shapes/RectShape.fr:package 
frege.android.graphics.drawable.sha

[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Ingo W.
So, there is

FregeAndroid/src/frege/android/os/Bundle.fr


and the module name is either 

frege.android.os.Bundle


or

Android.os.Bundle

(Note that, even when you develop in Windows, case does matter in module 
names.)

I'd really like to see the output of the following shell script:

cd FregeAndroid/src
find . -type f -name '*.fr' -exec egrep 'module|package' {} /dev/null ';'



Am Freitag, 23. September 2016 10:32:28 UTC+2 schrieb Patrick Pelletier:
>
> On 9/23/16 1:06 AM, Ingo W. wrote: 
> > Just include the directory where they are living in the sourcepath, 
> > and then compile your own files with the -make option. 
> > The frege compiler will then compile the modules you really need (that 
> > is, import directly or indirectly) before the ones that import them. 
>
> In that case, I think I can radically simplify the code in build.gradle 
> to: 
>
> project.afterEvaluate { 
>  extensions.compileFrege = { 
>  mkdir 'src/frege' 
>  description = 'Compile Frege to Java' 
>  javaexec { 
>  configurations.compile.resolve().each { 
>  classpath += files(it.toString()) 
>  } 
>  main = 'frege.compiler.Main' 
>  def a = ['-inline', '-d', 'src/frege', '-make', '-fp', 
> '/Users/ppelleti/Library/Android/sdk/platforms/android-21/android.jar', 
> '-sp', 'FregeAndroid/src:src/main/frege', 
> 'src/main/frege/org/funwithsoftware/frege_example/FregeCode.fr'] 
>  println 'Frege compiler args: "' + a.join(' ') + '"' 
>  args (*a) 
>  } 
>
> However, that still results in a similar failure: 
>
> :compileDebugJavaWithJavac 
> Frege compiler args: "-inline -d src/frege -make -fp 
> /Users/ppelleti/Library/Android/sdk/platforms/android-21/android.jar -sp 
> FregeAndroid/src:src/main/frege 
> src/main/frege/org/funwithsoftware/frege_example/FregeCode.fr" 
> Android.os.Bundle: build failed because module is not on class path 
> Android.text.Editable: build failed because module is not on class path 
> Android.view.DragEvent: build failed because module is not on class path 
> etc. 
>
> --Patrick 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Patrick Pelletier

On 9/23/16 1:06 AM, Ingo W. wrote:
Just include the directory where they are living in the sourcepath, 
and then compile your own files with the -make option.
The frege compiler will then compile the modules you really need (that 
is, import directly or indirectly) before the ones that import them.


In that case, I think I can radically simplify the code in build.gradle to:

project.afterEvaluate {
extensions.compileFrege = {
mkdir 'src/frege'
description = 'Compile Frege to Java'
javaexec {
configurations.compile.resolve().each {
classpath += files(it.toString())
}
main = 'frege.compiler.Main'
def a = ['-inline', '-d', 'src/frege', '-make', '-fp', 
'/Users/ppelleti/Library/Android/sdk/platforms/android-21/android.jar', 
'-sp', 'FregeAndroid/src:src/main/frege', 
'src/main/frege/org/funwithsoftware/frege_example/FregeCode.fr']

println 'Frege compiler args: "' + a.join(' ') + '"'
args (*a)
}

However, that still results in a similar failure:

:compileDebugJavaWithJavac
Frege compiler args: "-inline -d src/frege -make -fp 
/Users/ppelleti/Library/Android/sdk/platforms/android-21/android.jar -sp 
FregeAndroid/src:src/main/frege 
src/main/frege/org/funwithsoftware/frege_example/FregeCode.fr"

Android.os.Bundle: build failed because module is not on class path
Android.text.Editable: build failed because module is not on class path
Android.view.DragEvent: build failed because module is not on class path
etc.

--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Patrick Pelletier

On 9/23/16 12:12 AM, Ingo W. wrote:

Ok, in this case, it is the android library class that is missing.
So, it is a class path issue.


However, that error ("`android.animation.TimeInterpolator` is not a 
known java class") is no longer the error I'm getting.  (I've tried so 
many things that I'm starting to get confused about what failures I was 
getting when.)


Also, I'm going to try to move the Stack Overflow discussion back over 
here, because Stack Overflow is starting to complain about having 
discussions in the comments.


On Stack Overflow, Ingo wrote:

> That should be ok, since only module names are resolved against the 
sp. But are you sure it must be|src/frege|rather 
than|src/|or|src/frege/main|? This would imply you 
have|src/frege/frege/android/database/Cursor.fr|


You're right, making the sp absolute didn't fix anything.

However, "src/frege" is the -d option, not the -sp option. According to 
the compiler manpage, -d is the destination directory where the Java 
files are written.  The choice of "src/frege" for the output is 
unchanged from the snippet I got from Andreas Ländle earlier in this thread.


I have Frege source code in two different places:

"FregeAndroid/src" because I've included the FregeAndroid repository 
(where the bindings live) as the submodule "FregeAndroid" under my own 
repository.  (And "src" is where the Frege source lives in that repository.)


"src/main/frege" because that is where my own Frege source (that uses 
the binding) is located.


The code I currently am using in my build.gradle is:

project.afterEvaluate {
extensions.compileFrege = {
mkdir 'src/frege'
description = 'Compile Frege to Java'
['FregeAndroid/src', 'src/main/frege'].each { sp ->
def spAbs = (new File(sp)).getAbsolutePath()
def tree = fileTree(dir: sp, include: '**/*.fr')
tree.each { file ->
javaexec {
configurations.compile.resolve().each {
classpath += files(it.toString())
}
main = 'frege.compiler.Main'
def a = ['-inline', '-d', 'src/frege', '-make', 
'-fp', 
'/Users/ppelleti/Library/Android/sdk/platforms/android-21/android.jar', 
'-sp', spAbs, file.path]

println 'Frege compiler args: "' + a.join(' ') + '"'
args (*a)
}
}
}

so it is doing "FregeAndroid/src" first, and then "src/main/frege" second.

The full build.gradle is here:

https://github.com/ppelleti/frege-on-android/blob/b6ba18a142147fa0c0eb4e2e34f5ebe9871f4aee/build.gradle

and the full build output is here:

https://github.com/ppelleti/frege-on-android/blob/b6ba18a142147fa0c0eb4e2e34f5ebe9871f4aee/README.md

Although I've also edited my Stack Overflow question to include a 
snippet of the latest build output.


--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Ingo W.
By the way, you really don't need a separate build for those wrapper 
modules.
Just include the directory where they are living in the sourcepath, and 
then compile your own files with the -make option.
The frege compiler will then compile the modules you really need (that is, 
import directly or indirectly) before the ones that import them.
In addition, it won't compile already compiled, but not changed modules 
again each time.


-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-23 Thread Ingo W.
Ok, in this case, it is the android library class that is missing.
So, it is a class path issue.

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-22 Thread Patrick Pelletier

On 9/22/16 2:53 PM, Ingo W. wrote:

that looks weird.

As if you imported module X in module X itself?
Could you quote the first 5 lines of TimeInterpolator.fr?


Sure, the entire TimeInterpolator.fr is:

package frege.android.animation.TimeInterpolator where


data TimeInterpolator = pure native android.animation.TimeInterpolator where


  pure native getInterpolation :: TimeInterpolator -> Float -> Float
{-  -}

It's just the one from the FregeAndroid repository:

https://github.com/trilogysci/FregeAndroid/blob/master/src/frege/android/animation/TimeInterpolator.fr

(Sadly, that repository has no information about how to build it.)

--Patrick

P. S.  For anyone else following this conversation, Ingo and I are also 
having part of the conversation on Stack Overflow:


https://stackoverflow.com/questions/39583032/how-can-i-get-the-frege-compiler-to-see-android-api-classes-when-using-gradle


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-22 Thread Ingo W.
Patrick,

that looks weird.

As if you imported module X in module X itself?
Could you quote the first 5 lines of TimeInterpolator.fr?

Regards, Ingo

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-17 Thread Patrick Pelletier

On 9/16/16 5:07 PM, Patrick Pelletier wrote:
I'm not quite sure how it's supposed to know that the Frege-generated 
Java files are in src/frege, so I tried adding:


sourceSets {
main {
java.srcDirs.add 'src/frege'
}
}

but that didn't seem to do anything.


Well, this was me not understanding Gradle/Groovy.  It turns out the 
correct incantation was:


sourceSets {
main {
java.srcDirs += 'src/frege'
}
}

With this change, it worked!  I now have a successful example of an 
Android app that calls Frege code.  It is available at this point in my 
repository:


https://github.com/ppelleti/frege-on-android/tree/3e4685f078cdce3f8b704b779d0b05e72d6cffe6

However, I didn't want to leave it there.  I wanted my Frege code to be 
able to call the Android API.  So, I took a look at the FregeAndroid 
repository:


https://github.com/trilogysci/FregeAndroid
http://permalink.gmane.org/gmane.comp.lang.frege.general/177

It doesn't have any build instructions, so I just added it as a 
submodule of my repository, and added code to my build.gradle to build 
FregeAndroid along with my own Frege code:


project.afterEvaluate {
extensions.compileFrege = {
mkdir 'src/frege'
description = 'Compile Frege to Java'
def tree = fileTree(dir: 'FregeAndroid/src', include: '**/*.fr')
tree += fileTree(dir: 'src/main/frege', include: '**/*.fr')
tree.each { file ->
javaexec {
configurations.compile.resolve().each {
//println it.toString()
classpath += files(it.toString())
}
main = 'frege.compiler.Main'
args '-inline', '-d', 'src/frege', '-make', '-sp', 
'src/main/frege', "$file.path"

}
}
//delete fileTree('src/frege') {
//include '**/*.java'
//}
}

Although I'm still sketchy on Groovy, I think this is doing what I want, 
in terms of trying to build the FregeAndroid files.  However, the files 
don't actually build.  I get:


:compileDebugJavaWithJavac
E 
/Users/ppelleti/programming/android/example/FregeAndroid/src/frege/android/animation/TimeInterpolator.fr:4: 
`android.animation.TimeInterpolator` is not a known java class
Android.animation.TimeInterpolator: build failed because of compilation 
errors.

Build failed.
runtime 2.801 wallclock seconds.
:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

So, I think the problem is that the Frege compiler isn't seeing the 
Android API classes.  I guess I need to somehow put the Android API on 
the Frege compiler's classpath?  I'll look into this, but I wanted to 
post what I have so far, in case anyone has any ideas:


https://github.com/ppelleti/frege-on-android/tree/f92becc38c23129ea0e424909e96354fb8ceea2e

Thanks,

--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-16 Thread Patrick Pelletier

On 9/15/16 10:45 PM, Patrick Pelletier wrote:

On 9/15/16 5:08 PM, Patrick Pelletier wrote:
The first problem was that although it uses '**/*.fr', it seems that 
compileFrege() only works for frege files which are directly in 
src/main/frege.  If the frege files are in subdirectories of 
src/main/frege, it finds them, but then tries to look for them in 
src/main/frege, and doesn't find them.  I worked around this problem 
for now by just putting my frege file directly in src/main/frege.


That workaround turned out not to work, because my Frege class isn't 
in a package, so there's no way to import it from Java code.


I fixed that problem by using $file.path instead of $file.name.

However, I'm still unable to import my Frege class from my Java code, 
and I don't understand why.


I'm not quite sure how it's supposed to know that the Frege-generated 
Java files are in src/frege, so I tried adding:


sourceSets {
main {
java.srcDirs.add 'src/frege'
}
}

but that didn't seem to do anything.

I have my code at https://github.com/ppelleti/frege-on-android

If anyone has thoughts on what's going wrong, I'd really appreciate it!  
Thanks!


--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-15 Thread Patrick Pelletier

On 9/15/16 5:08 PM, Patrick Pelletier wrote:
The first problem was that although it uses '**/*.fr', it seems that 
compileFrege() only works for frege files which are directly in 
src/main/frege.  If the frege files are in subdirectories of 
src/main/frege, it finds them, but then tries to look for them in 
src/main/frege, and doesn't find them.  I worked around this problem 
for now by just putting my frege file directly in src/main/frege.


That workaround turned out not to work, because my Frege class isn't in 
a package, so there's no way to import it from Java code.



The next problem was that there were too many method references:

Dex: The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at 
https://developer.android.com/tools/building/multidex.html
trouble writing output: Too many method references: 110550; max is 
65536.

Too many classes to fit in one dex file.


Using multidex worked to solve this problem.  However, it means I'm 
putting lots of unnecessary code on the phone, including the whole Frege 
compiler!


--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-15 Thread Patrick Pelletier

On 9/13/16 11:32 AM, 'Andreas Ländle' via Frege Programming Language wrote:
first I started with the frege gradle plugin (and I've split the 
project into a java library containing the frege part and an android 
project) - but I found that to inflexible, especially if you want to 
have more control over the compiler; so I started to use a simple 
javaExec for the compilation.


Hope this snippet gives you an idea...


Thanks!  That was very helpful, and I've got it partially working. 
Unfortunately, I know very little about gradle or proguard, so I've run 
into some problems.


The first problem was that although it uses '**/*.fr', it seems that 
compileFrege() only works for frege files which are directly in 
src/main/frege.  If the frege files are in subdirectories of 
src/main/frege, it finds them, but then tries to look for them in 
src/main/frege, and doesn't find them.  I worked around this problem for 
now by just putting my frege file directly in src/main/frege.


The next problem was that there were too many method references:

Dex: The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at 
https://developer.android.com/tools/building/multidex.html
trouble writing output: Too many method references: 110550; max is 
65536.

Too many classes to fit in one dex file.

I tried to solve this problem by using Proguard to remove unneeded 
classes.  I added:


minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android.txt')

but now I get pages and pages of Proguard errors, with the summary at 
the end being:


Note: there were 7 references to unknown classes.
  You should check your configuration for typos.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Warning: there were 636 unresolved references to classes or interfaces.
 You may need to add missing library jars or update their versions.
 If your code works fine without the missing classes, you can 
suppress

 the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 1742 unresolved references to program class members.
 Your input classes appear to be inconsistent.
 You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
Warning: there were 20 unresolved references to library class members.
 You probably need to update the library versions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
Warning: Exception while processing task java.io.IOException: Please 
correct the above warnings first.

:transformClassesAndResourcesWithProguardForDebug FAILED

I'm not sure where to proceed from here.  I looked at the information 
about Proguard in the Frege FAQ on the wiki, but I wasn't sure how to 
apply that information to the gradle build system.


I've attached my build.gradle.

Thanks for any suggestions,

--Patrick

--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
apply plugin: 'android'

android {
compileSdkVersion 'android-21'
buildToolsVersion '24.0.2'

buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android.txt')
}
debug {
minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
}

repositories {
mavenCentral()
}

dependencies {
compile 'org.frege-lang:frege:3.23.401-g7c45277'
}

clean {
delete 'src/frege'
}

// http://permalink.gmane.org/gmane.comp.lang.frege.general/1083

project.afterEvaluate {
extensions.compileFrege = {
mkdir 'src/frege'
description = 'Compile Frege to Java'
fileTree(dir: 'src/main/frege', include: '**/*.fr').each { file ->
javaexec {
configurations.compile.resolve().each {
//println it.toString()
classpath += files(it.toString())
}
main = 'frege.compiler.Main'
args '-inline', '-d', 'src/frege', '-make', '-sp', 
'src/main/frege', "src/main/frege/$file.name"
}
}
delete fileTree('src/frege') {
include '**/*.java'
}
}

compileDebugJavaWithJavac.doFirst { compileFrege() }
compileReleaseJavaWithJavac.doFirst { compileFrege() }
// compileDebugJavaWithJack.doFirst { compileFrege() }
// compileReleaseJa

[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-13 Thread 'Andreas Ländle' via Frege Programming Language
Hi Ingo,

I know, its hard to believe - but take a look at 
https://code.google.com/p/android/issues/detail?id=218892

Or simply try to add a line like

int α = 42;


to your java source code and compile with jack. I'm pretty sure you will 
face a 'error: illegal character' message ;-(

Regarding your tip - I always used jdk9 to build frege itself; but after 
that I've extracted the sources and gave them to jack - this is where I'm 
struggling now (first with the encoding, but now with the 'Error during 
'TypeLegalizer' runner..' exception). As it seems all java compilers are 
buggy ;-)

Br,

Andreas

Am Dienstag, 13. September 2016 19:21:11 UTC+2 schrieb Ingo W.:
>
> Hi Andreas,
>
> good to know that Java6 will not be needed anymore.
>
> Regarding the Unicode characters  I'm a bit surprised that there still 
> should be a tool that doesn't handle them.
> However, one gets similar errors with the javac compiler, since it assumes 
> the "system default encoding" UNLESS you tell via the -encoding option what 
> you have.
>
> Please note also that the javac8 compiler may prodcue bad code that fails 
> the verifier. This is why I recommend to use javac9 with the -target 1.8 
> option.
>
> Best regards, Ingo
>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-13 Thread 'Andreas Ländle' via Frege Programming Language
Hi Patrick,
first I started with the frege gradle plugin (and I've split the project
into a java library containing the frege part and an android project) - but
I found that to inflexible, especially if you want to have more control
over the compiler; so I started to use a simple javaExec for the
compilation.

Hope this snippet gives you an idea...

clean{
delete 'src/frege'
}

project.afterEvaluate {
extensions.compileFrege = {
mkdir 'src/frege'
description = 'Compile Frege to Java'
fileTree(dir: 'src/main/frege', include: '**/*.fr').each { file ->
javaexec {
configurations.compile.resolve().each {
//println it.toString()
classpath += files(it.toString())
}
main = 'frege.compiler.Main'
args '-inline', '-d', 'src/frege', '-make', '-sp',
'src/main/frege', "src/main/frege/$file.name"
}
}
delete fileTree('src/frege') {
include '**/*.java'
}
}

//compileDebugJavaWithJavac.doFirst { compileFrege() }
//compileReleaseJavaWithJavac.doFirst { compileFrege() }
compileDebugJavaWithJack.doFirst { compileFrege() }
compileReleaseJavaWithJack.doFirst { compileFrege() }
}

Br,

Andreas

2016-09-13 16:51 GMT+02:00 Patrick Pelletier :

> On 9/13/16 12:49 AM, 'Andreas Ländle' via Frege Programming Language wrote:
>
>> I can confirm that frege works under Android in conjunction with JDK7 and
>> newer Android API Levels - at least I didn't face any problems ;-)
>>
>
> What do you use to build your app?  I know there's a Gradle plugin for
> Android, and a Gradle plugin for Frege, but I'm not sure how to combine
> them.
>
>
> --Patrick
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Frege Programming Language" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/frege-programming-language/iIJeAwlf8UM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> frege-programming-language+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-13 Thread Ingo W.
Hi Andreas,

good to know that Java6 will not be needed anymore.

Regarding the Unicode characters  I'm a bit surprised that there still 
should be a tool that doesn't handle them.
However, one gets similar errors with the javac compiler, since it assumes 
the "system default encoding" UNLESS you tell via the -encoding option what 
you have.

Please note also that the javac8 compiler may prodcue bad code that fails 
the verifier. This is why I recommend to use javac9 with the -target 1.8 
option.

Best regards, Ingo

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-13 Thread Patrick Pelletier

On 9/13/16 12:49 AM, 'Andreas Ländle' via Frege Programming Language wrote:
I can confirm that frege works under Android in conjunction with JDK7 
and newer Android API Levels - at least I didn't face any problems ;-)


What do you use to build your app?  I know there's a Gradle plugin for 
Android, and a Gradle plugin for Frege, but I'm not sure how to combine 
them.


--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-13 Thread 'Andreas Ländle' via Frege Programming Language
Hi, 
I can confirm that frege works under Android in conjunction with JDK7 and 
newer Android API Levels - at least I didn't face any problems ;-)
Currently I'm trying to use JDK8 with the new Android Jack Compiler - but 
I'm struggling with all the unicode (e.g. greek letters) identifiers not 
supported with Jack.
So I'm trying to build a latin-only version of the fregec.jar... seems to 
be more complicated than I've expected ;-(
Br,
Andreas

Am Dienstag, 13. September 2016 09:06:46 UTC+2 schrieb Patrick Pelletier:
>
> Never mind, I think I've been approaching it wrong.  ExecutorService was 
> never the problem with Java 6, it was ForkJoinPool. 
>
> However, Android has ForkJoinPool starting in API level 21: 
>
>
> https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html
>  
>
> So, perhaps the Java 6 version of Frege is no longer needed for 
> Android.  I will try to see if I can make some progress under that 
> assumption. 
>
> --Patrick 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-13 Thread Patrick Pelletier
Never mind, I think I've been approaching it wrong.  ExecutorService was 
never the problem with Java 6, it was ForkJoinPool.


However, Android has ForkJoinPool starting in API level 21:

https://developer.android.com/reference/java/util/concurrent/ForkJoinPool.html

So, perhaps the Java 6 version of Frege is no longer needed for 
Android.  I will try to see if I can make some progress under that 
assumption.


--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[frege-programming-language] Re: Android application in Frege & Frege Android

2016-09-12 Thread Patrick Pelletier

On 10/6/15 11:28 PM, Ingo W. wrote:

There is also a recipe for making a Frege compiler that produces Java6 code. It 
is probable that this recipe doesn't work anymore, but it is certainly possible 
to make it work again. I stand ready to answer technical questions regarding 
this.


I thought I'd give this a try and see how far I could get.  I used 
3.23.888 as a starting point, because I thought that might be more 
stable than master.  Here is what I've done so far:


https://github.com/ppelleti/frege/tree/3.23.888-java6

There were some easy changes to Runtime.java6, but I've gotten stuck on 
Concurrent.java6.  I stubbed out executorService() and 
setFregeExecutorService(), but apparently this isn't good enough.  I now 
get:


Looks good  let us try to make the tools and library ...
grep -v ForkJoin frege/StandardLibrary.fr >save/StandardLibrary.fr
java "-Dfrege.javac=internal" -Xmx1g -Xss4m -Dfrege.javac="javac -source 
1.6 -target 1.6" -jar fregec6.jar -d build6 -nocp -fp build6 -make \

frege/StandardTools.fr save/StandardLibrary.fr
Exception in thread "main" java.lang.NullPointerException
at 
frege.java.util.Concurrent$TExecutorService$5.eval(Concurrent.java:534)
at 
frege.java.util.Concurrent$TExecutorService$5.eval(Concurrent.java:531)

at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:200)
at frege.runtime.Delayed.forced(Delayed.java:257)
at frege.compiler.Main$1Fasync$28181$1$1$2.eval(Main.java:7038)
at frege.compiler.Main$1Fasync$28181$1$1$2.eval(Main.java:7035)
at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:198)
at frege.runtime.Delayed.forced(Delayed.java:267)
at frege.compiler.Main$1Fasync$28181$1$1.eval(Main.java:7066)
at frege.compiler.Main$1Fasync$28181$1$1.eval(Main.java:6990)
at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:200)
at frege.runtime.Delayed.forced(Delayed.java:257)
at frege.prelude.PreludeBase$TST$1.eval(PreludeBase.java:12446)
at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:200)
at frege.runtime.Delayed.forced(Delayed.java:267)
at frege.compiler.Main$39$2.eval(Main.java:7447)
at frege.compiler.Main$39$2.eval(Main.java:7444)
at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:198)
at frege.runtime.Delayed.forced(Delayed.java:267)
at frege.compiler.Main$41$2.eval(Main.java:8287)
at frege.compiler.Main$41$2.eval(Main.java:8176)
at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:198)
at frege.runtime.Delayed.forced(Delayed.java:267)
at frege.compiler.Main$42.eval(Main.java:8433)
at frege.runtime.Fun1$1.eval(Fun1.java:63)
at frege.runtime.Delayed.call(Delayed.java:198)
at frege.runtime.Runtime.runMain(Runtime.java:236)
at frege.compiler.Main.main(Main.java:9411)
make: *** [fregec6.jar] Error 1

So it appears that the compiler itself needs executorService() in order 
to run.  Any thoughts on how I should go about fixing this?


Thanks,

--Patrick


--
You received this message because you are subscribed to the Google Groups "Frege 
Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to frege-programming-language+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.