Re: [julia-users] the state of GUI toolkits?
Another possibility is IUP [http://webserver2.tecgraf.puc-rio.br/iup/]. It is a cross-platform GUI library that takes a 'wrapper' approach: like wxWidgets, it uses GTK widgets on X11 platforms and native widgets on Windows. Unlike wxWidgets, it has a straight C API, and I believe is a good deal simpler to use. It possibly lacks some features you would want if you were building an office suite or a full-featured IDE, but for most purposes I think it is quite sufficient. I created a Gist showing how you might use IUP from Julia to create a text editor with a Scintilla editing pane: https://gist.github.com/mgushee/3a3f032440219bc045b0 . I think my code is mostly correct; in fact, most parts of it work in isolation, but it segfaults when you try to create a menu from a list of menu items. I must be doing something wrong, but I'm a Julia newbie and not much of a C programmer, so I have no idea why. But anyway, have a look and see what you think! -- Matt Gushee On Tue, Apr 28, 2015 at 1:46 AM, Andreas Lobinger wrote: > Hello colleagues, > > what is status of availability and usecases for GUI toolkits. > > I see Tk and Gtk on the pkg.julialang.org. Gtk has the tag 'doesn't load' > from testing, Tk seems OK. > In a recent discussion here, Tim Holy mentioned himself tesing Qwt and Qt > in general seem to be a testcase for Cxx. > > Do i miss something here? > > Wishing a happy day, > Andreas > > >
Re: [julia-users] the state of GUI toolkits?
On Sun, May 3, 2015 at 4:04 PM, J Luis wrote: > > https://github.com/joa-quim/IUP.jl > > is a wrapper to the whole IUP lib. As I mentioned above in this thread the > main issue with it is the lack of upstream tutorials be cause otherwise > it's very fast and complete toolkit. > Oh, sorry, I missed that. Thanks for doing that! Why don't you submit it to the official package registry? -- Matt Gushee
Re: [julia-users] the state of GUI toolkits?
On Sun, May 3, 2015 at 4:15 PM, J Luis wrote: > Well, because I believe that for one to register a package it must have at > minimal decent documentation > Okay, that's fair. > Off course you are most well come to participate. I've ported almost all C > examples but still think we need a better documentation to IUP. > I agree. I might be able to help out, though I'm still not sure how seriously I will be using Julia. I think it's a wonderful language, but I don't really do technical computing, and I tend to favor language/tools that produce standalone native executables. I will at least try out your package, now that I know it exists. -- Matt Gushee
[julia-users] Seeking feedback on first project
Hi, Julia people-- First-timer here. I have been aware of Julia for a few months, and finally decided to take the plunge, and it's a great experience so far. Most of my recent programming has been in Scheme and Python, and, well, Scheme is both endlessly fascinating and endlessly frustrating, and I'm kind of bored with Python ;-). It's refreshing to find a language that Just Works [TM]. I don't know how much is attributable to good language design and how much to my own background (probably a bit of both), but it seems very easy to reason about how things work in Julia. So, kudos to the devs. Anyway, I'm developing a Redis client, and I thought I'd solicit constructive criticism on what I've done so far. I have a rudimentary implementation that somewhat works. I haven't documented anything, but my API is more or less a direct translation of the command set documented at http://redis.io/commands . I've lowercased the names, and MULTIPLE WORD COMMAND becomes multiple_word_command(); there is one case where I changed the name due to a conflict with a Julia keyword ('type' -> 'value_type'). I have started on a test suite, and all tests pass for me, but the coverage is minimal. My next step is to flesh out the test suite so as to test as many functions as possible (some things are not unit-testable AFAIK - e.g. 'DEBUG SEGFAULT' - think I'll skip that ;-) ) The project is at https://github.com/mgushee/Redis.jl. Let me know what you think! -- Matt Gushee
[julia-users] Re: Seeking feedback on first project
Hi, Avik-- On Saturday, November 29, 2014 4:13:18 PM UTC-7, Avik Sengupta wrote: > > > Thanks, that looks good. There was another effort at a Redis client > https://github.com/msainz/Redis.jl . > Oh, interesting. It didn't occur to me to search GitHub, but I did verify that there was no Redis client in the official package directory before starting. Anyway, the Redis API & protocol are pretty simple - I think I've spent about 6 hours on the project so far, including a lot of documentation-checking. > > > If would be good to see some performance numbers. Is there a significant > overhead of using a Julia client? > Good question, and I would be interested to know that too. I don't know much about database performance testing - any suggestions about where to start with that? BTW, I was considering writing a wrapper to the hiredis C library, but it looked like Julia doesn't provide a good facility for handling the structs that are returned by some of the hiredis functions - and I'm not much of a C programmer, so I figured a pure Julia client would be a much safer way to go. -- Matt Gushee
Re: [julia-users] Re: Seeking feedback on first project
Hi, John-- On Saturday, November 29, 2014 6:15:36 PM UTC-7, John Myles White wrote: > > Isn’t this library already a wrapper for Hiredis: > https://github.com/markmo/HiRedis.jl ? > Isn't that a rhetorical question? If you're trying to make me feel like I've wasted my time, it's not going to work ;-) Even if my project never becomes the Redis-client-of-choice for Julia, it's proving to be a great learning experience. And it occurs to me, too, that when I get around to performance testing, it might be very interesting to compare the pure Julia version with the C-wrapper version. -- Matt Gushee
Re: [julia-users] Re: Seeking feedback on first project
Hi, John-- On Saturday, November 29, 2014 7:19:07 PM UTC-7, John Myles White wrote: > > No, it was a serious question. I wanted to check if my understanding that > someone was already trying to wrap HiRedis was right given that you were > expressing skepticism about the possiblity of doing so. > Oh, well, no offense taken, and none given, I hope. As for the skepticism you refer to, I'm only skeptical of *my* ability to do that work; as I said, I'm not much of a C programmer. I think you would have to write a compatibility layer in C; I can even roughly imagine how to do it, but if I wrote that code it would probably dump core all over the planet. > > I would like us to have one official Redis library at some point, but I’m > always happy to see people giving themselves fun projects to learn Julia. > Agreed. Anyway, none of these is official yet, so I guess we'll just see what happens. -- Matt Gushee
Re: [julia-users] Are receivers idiomatic in Julia?
Hi, Sean-- I'm new to Julia myself, so take this with a grain of salt ... also, I'm not going to tell you that what you are trying to do is wrong or not done. However, I do think it is unidiomatic. I guess that, coming from an OO background, you are accustomed to thinking of 'method' as meaning a function that belongs to a particular object, and has access to that object's internal state. In a language like Julia that uses multiple dispatch, 'method' is a specialized implementation of a generic function. You probably read that somewhere, but if it's a new idea to you perhaps it's not clear what that means. There aren't many languages that fully support multiple dispatch, but it's very powerful. Anyway, I suppose it could be argued that 'methods' in Julia and in Java are in some sense the same thing - but I'll leave that argument to the academic computer scientists. There is no doubt that the two kinds of methods are very different in their surface manifestations. [PS: if you are indeed new to the concept of multiple dispatch, I've included a fun little exercise at the end that might give you some insights] On Sun, Nov 30, 2014 at 12:06 AM, Sean Gerrish wrote: > I'd find it natural to attach a method to a particular instance of an > object as in traditional object-oriented programming (see the example > below). I can manage this with the constructor NewFoo, which binds the > instance to the method after the object is created. Is this idiomatic in > Julia? Is there a more idiomatic way? The question is, what problem are you trying to solve? You are trying to recreate a familiar programming paradigm in a language that doesn't natively support it. I would guess that as you become more familiar with this language, you'll discover a better solution. But that's hard to say without knowing what you are trying to accomplish in the real world. However, if we define the problem as "create a type that contains two numeric values, and a method that performs a computation with those values," here's my suggestion: type Foo x::Number y::Number end function compute(f::Foo) f.x + f.y end foo = Foo(2, 3) compute(foo) => 5 And here's something you can try. I'm just showing code for you to enter - the results are omitted. julia> + julia> "a" + "b" julia> methods(+) julia> function +(a::String, b::String) string(a, b) end julia> + julia> "a" + "b" julia> methods(+) Pretty cool, huh? NOTE that I am not suggesting you distribute any code that does this for real - I think a lot of people would have a problem with extending '+' in that particular way; this is not Python. Hope that helps, and sorry for being long-winded. -- Matt Gushee
Re: [julia-users] Re: Is it wrong to think of Julia as a Lisp that uses m-expressions?
On Sun, Nov 30, 2014 at 3:28 PM, Chris Kohlhepp wrote: > Try typing "julia --lisp" and see what happens. Wow, that is some easter egg! Is there a serious purpose for this? Any documentation? -- Matt Gushee
Re: [julia-users] Re: What is Julia bad for - currently? Practically (or theoretically) - any other language more "powerful"?
On Fri, Dec 5, 2014 at 5:22 PM, ivo welch wrote: > > On Fri, Dec 5, 2014 at 6:47 PM, Páll Haraldsson > wrote: >> >> what is it you want? Why is web-programming special? And wouldn't Julia be >> as least as good a fit (for server side) as any other language? > > I do not want to hijack the julia list, so I will be short. I don't either, so I'll be even shorter. > > imho, a web language should allow you to pretend that you are programming > the GUI on a single desktop. That's kind of the idea behind Node.js, isn't it? Sounds like the mother of all leaky abstractions to me. -- Matt Gushee