by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 09 00:54

    aardappel on text

    (compare)

  • Jul 09 00:54

    aardappel on master

    Text input support + example (compare)

  • Jul 08 21:56

    aardappel on text

    Text input support + example (compare)

  • Jul 08 17:07
    stefandd closed #110
  • Jul 08 15:04
    stefandd edited #110
  • Jul 08 15:03
    stefandd edited #110
  • Jul 08 14:20
    stefandd edited #110
  • Jul 08 14:19
    stefandd edited #110
  • Jul 08 13:56
    stefandd opened #110
  • Jul 08 00:01

    aardappel on master

    Fix the [any] versions of the a… (compare)

  • Jul 08 00:01
    aardappel closed #109
  • Jul 08 00:01
    aardappel commented #109
  • Jul 07 21:45
    stefandd edited #109
  • Jul 07 21:44
    stefandd edited #109
  • Jul 07 21:34
    stefandd edited #109
  • Jul 07 21:25
    stefandd edited #109
  • Jul 07 21:24
    stefandd opened #109
  • Jul 07 16:40

    aardappel on master

    Made `if..: return` do control … (compare)

  • Jul 06 18:54

    aardappel on master

    Allow mult-def with types to ty… (compare)

  • Jul 06 17:26

    aardappel on master

    Resolve forward function calls … (compare)

J0eCool
@J0eCool

one.lobster:

import two
foo_a()

two.lobster:

namespace foo
def a():
    b()
def b():
    print "hi"

output:

two.lobster(3): error: call to unknown function: b
Joshua T Corbin
@jcorbin
indeed, I generally find that I have to follow pure bottoms-up definition order, rather than tops-down
Wouter van Oortmerssen
@aardappel
that looks like a bug.. it should definitely be able to support that
but yeah, I usually program bottom up, so I may have never encountered these cases
the weirdness is also worse because most errors in Lobster don't happen unless a function is actually called.. so just compiling two.lobster like won't do anything
I have a plan to move a lot of checking from parser -> type checker which likely will fix this, but it is a larger change.
I can look at this one individually tomorrow
J0eCool
@J0eCool
My actual use case has them mutually recursive. It can definitely support that without the namespace and just calling a() from one.lobster. If we add a call to a() to two.lobster and just build two.lobster, it works namespace or no. Namespace + multiple files is the smallest repro I could find
Is there a way to forward declare functions like in C? I can def b() -> void but that gives me a function type and a different error :P
Wouter van Oortmerssen
@aardappel
nope there isn't.. only forward decl of class/struct
I'd rather fix it such that forward decl isn't necessary :)
Kris Kowal
@kriskowal
i wonder how much of lobster’s magic necessarily follows from late instantiation. it feels like a very niche set of trade offs with some really nice upsides, even though some things are not obvious to the parser in the first pass.
Wouter van Oortmerssen
@aardappel
type system wise, plenty.. it simply can't be typechecked in a more normal order without losing most of its power
Wouter van Oortmerssen
@aardappel
@J0eCool the namespace example above has been fixed: aardappel/lobster@a508980
Turns out it was simply using the current namespace, rather than the namespace at the call site, to resolve b.
Joshua T Corbin
@jcorbin
I've not yet isolated a reproduction, but have had similar bugs around methods ; ended up having to explicate this.foo() rather than just foo() because it was incorrectly choosing a different "foo" than the class method ; it was some how provoked by refactoring and moving code around, so apropos of the ball-of-string around order sensitivity
it was getting something like ( from memory ) "no version of foo accepts 3 args" ; the call site was more like foo(a, b)
Wouter van Oortmerssen
@aardappel
I've seen such problems when there are methods with say 2 and 3 args.. but not when there is only 1 arity. So repro appreciated.
Joshua T Corbin
@jcorbin
indeed, I think mine was a 2-vs-3 scenario too, with the first arg being the this receiver ( sorry Go nomenclature is ingrained for me now ;-) )
Wouter van Oortmerssen
@aardappel
yeah that is an issue, as it uses the number of args to guess wether you are wanting to stick a this in there.. that logic could maybe be improved
Wouter van Oortmerssen
@aardappel
@jcorbin when you got your (now famous) stack overflow, were you running the compiler in debug mode?
because boy does it insert a lot of guard values in debug mode.. it uses 5-10x more stack than in release mode
Joshua T Corbin
@jcorbin
I think it was normal non debut mode at first
Wouter van Oortmerssen
@aardappel
hmmm..
Wouter van Oortmerssen
@aardappel
@jcorbin / @kriskowal I had lunch with you guys on my calendar, but looks like i may not be around.. can we shift it for some other time?
Joshua T Corbin
@jcorbin
Kris is out of town and I’m nothing if not flexible, let’s reschedule next year
Wouter van Oortmerssen
@aardappel
ok!
Wouter van Oortmerssen
@aardappel
Some cool generalization of generics happened in aardappel/lobster@d12d6c4
not perfect yet, but extends what you can do with generics a fair bit
Also, was thinking of moving (or initially just duplicating) Lobster chat to discord.. it seems to have more momentum behind it, with many people already on there.. thoughts?
J0eCool
@J0eCool
I'm fine with that though I barely check either
Wouter van Oortmerssen
@aardappel
Ok.. just curious how many more casual user would stick around
Joshua T Corbin
@jcorbin
I already use discord for e.g. onivim dev chatter, so happy to switch ; others, like Gophers dev chatter happens on Slack ; I was actually liking this 3rd also ran platform, with tight github status sidebar... but am happy to straddle any other platforms ;-)
in particular, gitter's mobile app induces frustration (for me), so I won't miss it ; only the desktop/web app is notable vs its competitors from my pov
Joshua T Corbin
@jcorbin
e.g. the deep linking, tooltip integration, and such make it so that I can peek at that generics commit above, and not spend time clicking through for now ; instead dropping a mental note to take a look next time I pull master
Wouter van Oortmerssen
@aardappel
Yeah gitter is pretty neat with its instant github integration.. and I'll probably keep it for the foreseeable future.. but Discord seems to be where most people are, and stay. Slack is a bit heavyweight since it requires an account for each group.. that's nice about discord: if you're already on there, it takes no extra effort to hang out in more groups
Wouter van Oortmerssen
@aardappel
hah, I really don't use the mobile app of any of these systems.. its web only for me
J0eCool
@J0eCool
Is there already a lobster discord, or does it need making?
note: not volunteering :D
just making sure I'm not missing a link
Wouter van Oortmerssen
@aardappel
:)
So for the moment will keep this one and the discord active.. we'll see which is better in the long run
Wouter van Oortmerssen
@aardappel
:)
Wouter van Oortmerssen
@aardappel
non-expiring Lobster Discord link: discord.gg/szJPYdX
Wouter van Oortmerssen
@aardappel
Cool new feature: you can now use explicit generics without having to create a named specialization for structs: aardappel/lobster@bc58e7f
Wouter van Oortmerssen
@aardappel
PSA: if you do anything with colors in Lobster I have potentially just broken your stuff with that last commit (the SRGB one). But it its for the best, really. Please read the commit message to learn how to deal with it :) aardappel/lobster@42aca24
kcvinu
@vinodvinu
Hi all, can i use win32 API functions in loabster ?
Wouter van Oortmerssen
@aardappel
@vinodvinu there's currently no bindings directly to win32. Most of what you'd use win32 for is exposed more portably thru functions coming from SDL/OpenGL/libc etc. What function(s) from win32 would you like to use?