<<05-08-2012>>

17:53:32*NimBot joined #nimrod
17:54:26dom96apriori__: c2nim converts it to this: proc strtod*(nptr: cstring; endptr: cstringArray): cdouble
17:54:41apriori__O_o..ok
17:55:13dom96I think cstringArray is just ptr cstring though
17:55:28dom96and the ; can just be , anyway
17:56:33apriori__well
17:56:37apriori__doesn't like that either
17:56:53dom96oh er.
17:56:56apriori__ gcc -c -w -I/usr/lib/nimrod -o /home/armin/nimcache/bla.o /home/armin/nimcache/bla.c
17:56:57dom96You need to specify the header.
17:56:57apriori__/home/armin/nimcache/bla.c:160:1: error: conflicting types for ‘strtod’
17:56:59apriori__In file included from /usr/lib/nimrod/nimbase.h:251:0,
17:57:00apriori__ from /home/armin/nimcache/bla.c:8:
17:57:02apriori__/usr/include/stdlib.h:164:15: note: previous declaration of ‘strtod’ was here
17:57:17dom96hrm.
17:59:37apriori__dom96: interesting
17:59:40apriori__working..
17:59:43apriori__but I don't really get, why
17:59:52apriori__and why "header" was needed, at all
17:59:56apriori__because I never needed it
18:00:13dom96I have no idea either heh
18:04:16*Araq_bnc quit (*.net *.split)
18:10:13*Araq_bnc joined #nimrod
18:10:22*XAMPP_ joined #nimrod
18:13:28*XAMPP quit (Ping timeout: 246 seconds)
18:16:54*apriori__ quit (Quit: Konversation terminated!)
18:31:57*Araq_bnc is now known as Araq
18:41:33dom96Araq: Why is header required?
18:41:43Araqfor what?
18:41:57dom96Read scrollback.
18:41:59dom96Oh wait.
18:42:17Araq17:54:26 dom96 apriori__: c2nim converts it to this: proc strtod*(nptr: cstring; endptr: cstringArray): cdouble
18:43:11Araqit's not really required ... 'nodecl' is required
18:43:17dom96ahh
18:43:20Araqit's just that header implies 'nodecl' ...
18:43:24dom96mm
18:43:36dom96brb
20:25:14*XAMPP_ quit (Quit: Leaving)
20:25:53*XAMPP joined #nimrod
20:37:12dom96back
21:43:19shevywheee
21:43:33Araqhi shevy
21:44:33shevyoh whoever runs http://forum.nimrod-code.org/
21:44:48shevycould add a link to dom96's site
21:44:51shevywhere was it again? :)
21:45:09shevyhttp://dom96.co.cc/nimbuild/
21:45:10shevyhmm
21:45:21shevyhad the link stored in a local page
21:45:30shevyI am trying to find examples for those Type * things
21:45:39Araqhttp://build.nimrod-code.org/ also exists
21:46:19Araqshevy: do you know what a grammar is?
21:46:27shevyoh nice... when you search for "nimrod type system"... you get links to forum where people wrote about nimrod: http://www.dreamincode.net/forums/topic/209048-nimrod-the-compiled-garbage-collected-systems-programming-language/
21:46:39shevyAraq, hmm not sure... rules to "build" a language? its logical parts or context perhaps?
21:47:04Araqalright well my explanation about types won't help you then ;-)
21:47:09shevyhehe
21:47:15shevyoh don't worry too much
21:47:25shevyI like to look at example code, and slowly get my head into trying to understand what it does
21:47:35shevyvar tcp : TSocket
21:47:46shevytcp is a variable I suppose
21:47:52AraqI'm puzzled why this is so difficult for you
21:47:53shevywhat is TSocket precisely?
21:48:02shevyI never really used types in such a way before
21:48:09dom96shevy: Have you looked at my Ruby to Nimrod comparison gist?
21:48:11Araqit's a type that means: "tcp is a socket"
21:48:15shevyin ruby, you only have to do things like object.to_a (to convert it into an Array) for instance
21:48:26Araqin ruby there are types as well
21:48:30shevydom96, where was that gist? sorry ... might be I fell asleep *blush*
21:48:33Araqit's just that you cannot write them down
21:48:40shevyhmm ok
21:48:58dom96https://gist.github.com/3263560
21:48:59shevycan I say then... "The variable tcp is of type TSocket." that would be correct?
21:49:12dom96Please be aware, that code does not compile
21:49:17shevyaha
21:49:27shevyok... the procs are like defs
21:49:35dom96I just wrote it as a way to perhaps make you understand
21:49:56shevywell ok
21:49:57Araqshevy: yes you can say that
21:50:02shevyname and age... similar to @name and @age
21:50:04*Boscop quit (Disconnected by services)
21:50:07*Boscop joined #nimrod
21:50:10shevyand string and int I suppose say that these are their types
21:50:13shevybut what is the * there again?
21:50:19shevyage*: int
21:50:21Araqexport marker
21:50:36Araqhas nothing to do with the type
21:50:54shevyaha ok
21:50:59shevynext newbie question
21:51:03shevyname will always be a string right?
21:51:13Araqyes
21:51:18shevyok :)
21:51:46shevyoh dom96 ... the part:
21:51:48shevy result.name = name
21:51:51shevywhere from is result ?
21:52:01shevyI take it that name and age are arguments to newPerson
21:52:07shevybut I am unsure where result. is from ...
21:52:20dom96Every proc that returns something has a magic 'result' variable defined
21:52:23dom96So that you don't need to
21:53:38Araq'result' represents the return value
21:53:46Araqproc p(): int =
21:53:47shevyah ok
21:53:51Araq result = 13
21:53:56Araqreturns 13
21:54:17shevywould that conflict somehow?
21:54:18shevyfor instance
21:54:24Araqgood nimrod style is to avoid the 'return' keyword ;-)
21:54:26shevy TPerson = object
21:54:36shevy result*: int
21:54:42shevywould that be possible ^^^ ?
21:54:49shevyhehe
21:54:49Araqyes
21:55:04shevyin ruby, you can omit the "return" keyword too. the last expression is automatically what is returned
21:55:07shevybut I like it, visually
21:55:09shevydef foo
21:55:10shevy return 5
21:55:12shevyhmm
21:55:14shevydef foo
21:55:15shevy 5
21:55:19shevyis shorter though, so I have mixed feelings
21:55:25shevyok Araq
21:55:37AraqI like that the last expression is automatically returned in ruby
21:55:48shevyok one question:
21:55:49Araqunfortunately nimrod does not work that way (yet...)
21:55:49shevy return person.name & " " & person.age
21:55:55shevyI take it & is string concatenation
21:56:05shevyand name is a string... but .age should be an int right?
21:56:13Araqright
21:56:16shevyhow does nimrod know that this concatenation should work?
21:56:26Araqit doesn't work ;-)
21:56:32shevydom96!!!
21:56:38Araqyou need to convert the int to a string with $
21:56:40shevyteach me bad things!
21:56:42shevyah ok
21:56:44dom96yes?
21:56:52shevyoh
21:56:59dom96oh, yeah.
21:57:02dom96My mistake sorry
21:57:03Araqit could easily work though:
21:57:19Araqproc `&` (x: string, y: int) = result = x & $y
21:57:29shevyhmm
21:57:31Araqand then it would work
21:57:34shevyok
21:57:53Araqit's a feature nimrod doesn't have that in its stdlib though ;-)
21:59:28dom96Araq: Is the column for --def 0 or 1-based?
22:00:05Araqthe same as what aporia does
22:00:22dom96er. Well line was wrong already :P
22:00:35dom96well maybe not
22:00:38dom96but I had to subtract 1
22:00:51dom96So i'm guessing it's the same for col
22:02:05Araqwhy subtract 1?
22:02:11AraqI didn't have to do that ...
22:02:58dom96i dunno
22:03:06dom96If I don't it's 1 too far
22:09:37*XAMPP_ joined #nimrod
22:10:36Araqwell it starts with line 1 ...
22:10:44*XAMPP_ quit (Read error: Connection reset by peer)
22:12:29*XAMPP_ joined #nimrod
22:12:31*XAMPP quit (Ping timeout: 246 seconds)
22:12:59dom96Araq: There you go.
22:13:11Araqyummy
22:13:11dom96But just FYI scrolling fails when it opens a new file...
22:13:19Araqwhy?
22:13:21dom96Because GTK is being a bitch as always with scrolling
22:13:24AraqI thought you fixed that
22:13:39dom96Well it decides to fail again on Go to definition
22:14:43dom96I bet your first question will be: "How do I use this?"
22:14:43dom96:P
22:14:49dom96Right click in the editor ;)
22:16:24Araqlol
22:16:29Araqit doesn't work :P
22:16:41Araqbut I know why ;-)
22:16:59dom96oh?
22:17:38Araqwell I'm testing it in an include file
22:17:56Araqso the compiler jumps to the first occurance of the symbol, not its definition
22:18:30Araqyay
22:18:33Araqit works
22:18:41Araqexcept for the scrolling part of course
22:18:59Araqnow that should be useful
22:19:05dom96The scrolling works if the file is already opened
22:20:30Araqhm
22:20:32Araqbug! :P
22:20:40Araqit doesn't list the file as recently opened
22:20:47Araqwhen it opened the file for --def
22:21:01dom96oh god. Come on :P
22:21:19Araqit's a bug, don't deny it
22:29:34dom96I could argue it's not.
22:29:50dom96:P
22:29:53dom96I should sleep anyway.
22:29:54dom96bye
22:30:23Araqgood night
23:01:19*XAMPP_ quit (Quit: Leaving)
23:05:41*Trix[a]r_za is now known as Trixar_za
23:46:37Araqgood night
23:47:04Trixar_zaGoodnite Araq
23:50:44*XAMPP joined #nimrod