logs archiveBotHelp.net / Freenode / #ada / 2015 / August / 11 / 1
jk4
Visaoni: Ada.Text_IO.New_Line is not the new_line character
Visaoni
indeed it is not
jk4
oh you got it
why is his computer so tired?
Shark8
!last
mats
hello friends
liste
hello
sparre
Good morning (+time zone corrections)
Shark8
Hi,
tkoskine
Hello
gthorslund
hi
Shark8
So, anything happen here in #Ada in the past week? (I've been w/ family.)
gthorslund
(Action) been away for months, and not very present now either...
Shark8
gthorslund: Anything in particular for being away? Like a new project? Or just a loss of interest/drive?
gthorslund
Shark8: Was on a long term leave for studies from work Sept-May so tried to focus on studies. Then came summer and then I've kind of forgot about irc. So I guess it started with loss of time.
Shark8
gthorslund: Ah, gotcha. Welcome back.
gthorslund: If you don't mind my asking, what ares(s) are your studies in?
mats
do ada jobs at the entry level exist?
I'm interested in picking up a sane language and would love it if there is opportunity for professional development as well
Shark8
mats: They do! I once had a recruiter contact me about doing some avionics UI system... unfortunately their contact basically fell off the face of the earth and they couldn't get in touch w/ the person in that project.
gthorslund
Shark8: Long time ago I started studies towards a Master of Science in Applied Physics and Electrical Engineering with a Software Engineering profile. Since I didn't graduate I finally took time off to complete old classes, take some new and do master's thesis.
Shark8
mats: I suspect that showing interest/enthusiasm/willingness-to-learn will go a long way towards getting a foot in the door.
gthorslund
Shark8: Maybe I've posted it before, but my master's thesis can be found at http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-120079
Shark8
gthorslund: Hm, interesting -- I'll have to give it a read, though I have absolutely no idea how much I'll 'get'.
mats
hm, ok
mk270
are there a lot of jokes in the thesis?!
gthorslund
Shark8: Tell me if you still find it interesting after reading ;-)
Shark8
gthorslund: Sure; I'll probably tackle it tomorrow. (It's night here now.)
gthorslund
mk270: no, it's fairly try. I had one under limitations in a draft along the lines "Since this is a master's thesis and not a volume, most pictures are two dimensional".
mats
any folks working on interesting projects?
gthorslund
mk270: After brainstorming formal English I had this regarding bugs "It would be deplorable not to investigate the matters further, and tragic not to fix and admit test cases for known matters.", but changed it to not so strong words in the final version.
sparre
mats: I am. But I would have to terminate you, before I could tell you about it.
mats
let's not and say you did
sparre
There's a small side project: https://bitbucket.org/sparre/command-line-parser-generator/wiki/Home
Shark8
mats: I have two that I'm trying to get off the ground... one is a project-manager here: https://github.com/OneWingedShark/AdaProjectManager
and the other is a CPAN-like project I'm writing up a draft for... the *REALLY* rough draft is here: https://drive.google.com/file/d/0BzyjMtQJe7iWTTBsS2o4TXBvWFU/view?usp=sharing
gthorslund
mats: guess this is my most recent https://bitbucket.org/gthorslund/ada-big-numbers "Last updated 2014-04-08"
mats
neat, will read through these and return at a later date
Visaoni
well, consider my mind blown. passing callbacks via string...
like, literally, quoting the code to call a function
(Action) wishes he had never seen Javascript or PDFs or anything
setCallback("someEvent", "inRange(3,5)");
inRange, of course, accesses a global to compare to
sparre
That hurts.
Visaoni
Yeah... and it's not even unusually bad compared to the rest of this
Shark8
Visaoni: That sounds... horrible.
Lucretia
mats: define "interesting"
mats
you misunderstand -- its up to the reader to define interesting :)
Lucretia
no, you misunderstood, it's up to you to find it interesting :P
antranigv
if I'm talking about Ada types, am I talking about the predefined types in the Standard package or the Ada package?
sparre
antranigv: No. You're talking about any type it is possible to declare in Ada.
Lucretia
you are talking about Ada types
darkestkhan
antranigv: package is not type
and Ada types are not restricted to the ones in Standard and Ada
... my first sentence is a result of heat
stringing anything sensible and comprehensible is too hard
antranigv
ah I see
I still don't understand, how to do, say, if Number is type Integer, what if the user intered a character, say 'a', instead of '1', how to prevent that and print, say "please enter an integer, a is not an integer" for example.
(Action) feels dumb when reading the ARM-05
Shark8
antranigv: You could wrap things in a function which returns an integer, get the input and on constraint_error print the message and loop... I'll build a little example for you.
antranigv
tnx Shark8 ^^
I'll try till you do that
Shark8
antranigv: https://pastebin.mozilla.org/8842408
It's a generic that will work with any enumeration or integer-type.
antranigv
tnx Shark8, hmm, let me try now (:
cerealkiller... where did I see that before?...
Shark8
antranigv: How's it working for you?
sparre
antranigv: If you were writing your UI with a framework such as GtkAda, you would attach a callback to changes to the entry field, where you compensate/correct for invalid changes to the content.
antranigv
umm, Shark8, still trying to understand :) (p.s. I'm #newhere), sparre, I'll keep that note, for later ofcourse (:
sparre
antranigv: Shark8 is giving you a somewhat general solution. Have you instantiated a generic package/subprogram before?
Shark8
antranigv: Ah, well let me explain it; the lines 1..7 describe a generic-function which returns a type which is specified by the formal parameter on line 2.
(Line 2 describes "any enumeration or integral type", and as such has certain attributes and properties guaranteed to exist.)
darkestkhan
antranigv: you have to test if character is digit (in your example you would compare it with '1' in if statement)
Shark8
Line 3 says that one of the things required [formal parameters] is a function which (a) takes a string and (b) returns a thing of generic-parameter T, and (c) defaults this function to the 'Value attribute. [Which T possesses, and fits the given subprogram specification profile.]
Line 4 requires a Flush procedure, to clear your buffer; line 5 requires a procedure which takes a string [a PRINT-style procedure is assumed]; line 6 requires a function which returns a string [a READ-style procedure is assumed].
Lines 9..23 implement the subprogram given the requirements listed.
Lines 26..31 create an actual-procedure from the generic, passing in the proper subprograms from Ada.Text_IO as parameters.
Lines 33..38 are a text/example of usage.
antranigv: Um, does that make sense?
Visaoni: I've edited the draft for SCALP-M -- https://drive.google.com/file/d/0BzyjMtQJe7iWTTBsS2o4TXBvWFU/view?usp=sharing
Do you think this is better?
« prev next »